blob: 8a45ba76b18799d62ab633d1fd516151b7fe326c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
Doug Kearns93197fd2024-01-14 20:59:02 +01002" Language: xhtml
Bram Moolenaar1588bc82022-03-08 21:35:07 +00003"
4" This runtime file is looking for a new maintainer.
5"
6" Former maintainer: Dan Sharp
Doug Kearns93197fd2024-01-14 20:59:02 +01007" Last Changed: 2009 Jan 20
8" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009
10if exists("b:did_ftplugin") | finish | endif
11
12" Make sure the continuation lines below do not cause problems in
13" compatibility mode.
14let s:save_cpo = &cpo
15set cpo-=C
16
17" Define some defaults in case the included ftplugins don't set them.
18let s:undo_ftplugin = ""
Bram Moolenaar8299df92004-07-10 09:47:34 +000019let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010020 \ "XML Files (*.xml)\t*.xml\n"
21if has("win32")
22 let s:browsefilter .= "All Files (*.*)\t*\n"
23else
24 let s:browsefilter .= "All Files (*)\t*\n"
25endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000026let s:match_words = ""
27
28runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
29unlet b:did_ftplugin
30
31" Override our defaults if these were set by an included ftplugin.
32if exists("b:undo_ftplugin")
33 let s:undo_ftplugin = b:undo_ftplugin
34 unlet b:undo_ftplugin
35endif
36if exists("b:browsefilter")
37 let s:browsefilter = b:browsefilter
38 unlet b:browsefilter
39endif
40if exists("b:match_words")
41 let s:match_words = b:match_words
42 unlet b:match_words
43endif
44
45runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
46let b:did_ftplugin = 1
47
48" Combine the new set of values with those previously included.
49if exists("b:undo_ftplugin")
50 let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
51endif
52if exists("b:browsefilter")
53 let s:browsefilter = b:browsefilter . s:browsefilter
54endif
55if exists("b:match_words")
56 let s:match_words = b:match_words . "," . s:match_words
57endif
58
59" Load the combined list of match_words for matchit.vim
60if exists("loaded_matchit")
61 let b:match_words = s:match_words
62endif
63
64" Change the :browse e filter to primarily show tcsh-related files.
Doug Kearns93197fd2024-01-14 20:59:02 +010065if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Bram Moolenaar8299df92004-07-10 09:47:34 +000066 let b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter
Bram Moolenaar071d4272004-06-13 20:20:40 +000067endif
68
69" Undo the stuff we changed.
70let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
71
72" Restore the saved compatibility options.
73let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010074unlet s:save_cpo