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: jsp |
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 = "" |
| 19 | let s:browsefilter = "Java Files (*.java)\t*.java\n" . |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 20 | \ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" |
| 21 | if has("win32") |
| 22 | let s:browsefilter .= "All Files (*.*)\t*\n" |
| 23 | else |
| 24 | let s:browsefilter .= "All Files (*)\t*\n" |
| 25 | endif |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 26 | let s:match_words = "" |
| 27 | |
| 28 | runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim |
| 29 | unlet b:did_ftplugin |
| 30 | |
| 31 | " Override our defaults if these were set by an included ftplugin. |
| 32 | if exists("b:undo_ftplugin") |
| 33 | let s:undo_ftplugin = b:undo_ftplugin |
| 34 | unlet b:undo_ftplugin |
| 35 | endif |
| 36 | if exists("b:browsefilter") |
| 37 | let s:browsefilter = b:browsefilter |
| 38 | unlet b:browsefilter |
| 39 | endif |
| 40 | if exists("b:match_words") |
| 41 | let s:match_words = b:match_words |
| 42 | unlet b:match_words |
| 43 | endif |
| 44 | |
| 45 | runtime! ftplugin/java.vim ftplugin/java_*.vim ftplugin/java/*.vim |
| 46 | let b:did_ftplugin = 1 |
| 47 | |
| 48 | " Combine the new set of values with those previously included. |
| 49 | if exists("b:undo_ftplugin") |
| 50 | let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin |
| 51 | endif |
| 52 | if exists ("b:browsefilter") |
| 53 | let s:browsefilter = b:browsefilter . s:browsefilter |
| 54 | endif |
| 55 | if exists("b:match_words") |
Bram Moolenaar | 95b28ec | 2005-10-11 20:32:28 +0000 | [diff] [blame] | 56 | let s:match_words = b:match_words . ',' . s:match_words |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 57 | endif |
| 58 | |
| 59 | " Load the combined list of match_words for matchit.vim |
| 60 | if exists("loaded_matchit") |
| 61 | let b:match_words = s:match_words |
| 62 | endif |
| 63 | |
| 64 | " Change the :browse e filter to primarily show JSP-related files. |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 65 | if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 66 | let b:browsefilter="JSP Files (*.jsp)\t*.jsp\n" . s:browsefilter |
| 67 | endif |
| 68 | |
| 69 | " Undo the stuff we changed. |
| 70 | let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin |
| 71 | |
| 72 | " Restore the saved compatibility options. |
| 73 | let &cpo = s:save_cpo |
Bram Moolenaar | 84f7235 | 2012-03-11 15:57:40 +0100 | [diff] [blame] | 74 | unlet s:save_cpo |