aspvbs.vim 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. " Vim filetype plugin file
  2. " Language: aspvbs
  3. "
  4. " This runtime file is looking for a new maintainer.
  5. "
  6. " Former maintainer: Dan Sharp
  7. " Last Changed: 20 Jan 2009
  8. if exists("b:did_ftplugin") | finish | endif
  9. " Make sure the continuation lines below do not cause problems in
  10. " compatibility mode.
  11. let s:save_cpo = &cpo
  12. set cpo-=C
  13. " Define some defaults in case the included ftplugins don't set them.
  14. let s:undo_ftplugin = ""
  15. let s:browsefilter = "HTML Files (*.html, *.htm)\t*.htm*\n" .
  16. \ "All Files (*.*)\t*.*\n"
  17. let s:match_words = ""
  18. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
  19. let b:did_ftplugin = 1
  20. " Override our defaults if these were set by an included ftplugin.
  21. if exists("b:undo_ftplugin")
  22. let s:undo_ftplugin = b:undo_ftplugin
  23. endif
  24. if exists("b:browsefilter")
  25. let s:browsefilter = b:browsefilter
  26. endif
  27. if exists("b:match_words")
  28. let s:match_words = b:match_words
  29. endif
  30. " ASP: Active Server Pages (with Visual Basic Script)
  31. " thanks to Gontran BAERTS
  32. if exists("loaded_matchit")
  33. let s:notend = '\%(\<end\s\+\)\@<!'
  34. let b:match_ignorecase = 1
  35. let b:match_words =
  36. \ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' .
  37. \ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' .
  38. \ '^\s*\<sub\>:\<end\s\+sub\>,' .
  39. \ '^\s*\<function\>:\<end\s\+function\>,' .
  40. \ '\<class\>:\<end\s\+class\>,' .
  41. \ '^\s*\<do\>:\<loop\>,' .
  42. \ '^\s*\<for\>:\<next\>,' .
  43. \ '\<while\>:\<wend\>,' .
  44. \ s:match_words
  45. endif
  46. " Change the :browse e filter to primarily show ASP-related files.
  47. if has("gui_win32")
  48. let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter
  49. endif
  50. let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin
  51. " Restore the saved compatibility options.
  52. let &cpo = s:save_cpo
  53. unlet s:save_cpo