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