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