jsp.vim 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. " Vim filetype plugin file
  2. " Language: jsp
  3. " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
  4. " Last Changed: 20 Jan 2009
  5. " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
  6. if exists("b:did_ftplugin") | finish | endif
  7. " Make sure the continuation lines below do not cause problems in
  8. " compatibility mode.
  9. let s:save_cpo = &cpo
  10. set cpo-=C
  11. " Define some defaults in case the included ftplugins don't set them.
  12. let s:undo_ftplugin = ""
  13. let s:browsefilter = "Java Files (*.java)\t*.java\n" .
  14. \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
  15. \ "All Files (*.*)\t*.*\n"
  16. let s:match_words = ""
  17. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
  18. unlet b:did_ftplugin
  19. " Override our defaults if these were set by an included ftplugin.
  20. if exists("b:undo_ftplugin")
  21. let s:undo_ftplugin = b:undo_ftplugin
  22. unlet b:undo_ftplugin
  23. endif
  24. if exists("b:browsefilter")
  25. let s:browsefilter = b:browsefilter
  26. unlet b:browsefilter
  27. endif
  28. if exists("b:match_words")
  29. let s:match_words = b:match_words
  30. unlet b:match_words
  31. endif
  32. runtime! ftplugin/java.vim ftplugin/java_*.vim ftplugin/java/*.vim
  33. let b:did_ftplugin = 1
  34. " Combine the new set of values with those previously included.
  35. if exists("b:undo_ftplugin")
  36. let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
  37. endif
  38. if exists ("b:browsefilter")
  39. let s:browsefilter = b:browsefilter . s:browsefilter
  40. endif
  41. if exists("b:match_words")
  42. let s:match_words = b:match_words . ',' . s:match_words
  43. endif
  44. " Load the combined list of match_words for matchit.vim
  45. if exists("loaded_matchit")
  46. let b:match_words = s:match_words
  47. endif
  48. " Change the :browse e filter to primarily show JSP-related files.
  49. if has("gui_win32")
  50. let b:browsefilter="JSP Files (*.jsp)\t*.jsp\n" . s:browsefilter
  51. endif
  52. " Undo the stuff we changed.
  53. let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
  54. " Restore the saved compatibility options.
  55. let &cpo = s:save_cpo
  56. unlet s:save_cpo