blob: 21ed3e1100e83493d43bf9c575e58e7d77549dc5 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: xhtml
Bram Moolenaar5c736222010-01-06 20:54:52 +01003" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
4" Last Changed: 20 Jan 2009
5" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
Bram Moolenaar071d4272004-06-13 20:20:40 +00006
7if exists("b:did_ftplugin") | finish | endif
8
9" Make sure the continuation lines below do not cause problems in
10" compatibility mode.
11let s:save_cpo = &cpo
12set cpo-=C
13
14" Define some defaults in case the included ftplugins don't set them.
15let s:undo_ftplugin = ""
Bram Moolenaar8299df92004-07-10 09:47:34 +000016let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
Bram Moolenaar071d4272004-06-13 20:20:40 +000017 \ "XML Files (*.xml)\t*.xml\n" .
18 \ "All Files (*.*)\t*.*\n"
19let s:match_words = ""
20
21runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
22unlet b:did_ftplugin
23
24" Override our defaults if these were set by an included ftplugin.
25if exists("b:undo_ftplugin")
26 let s:undo_ftplugin = b:undo_ftplugin
27 unlet b:undo_ftplugin
28endif
29if exists("b:browsefilter")
30 let s:browsefilter = b:browsefilter
31 unlet b:browsefilter
32endif
33if exists("b:match_words")
34 let s:match_words = b:match_words
35 unlet b:match_words
36endif
37
38runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
39let b:did_ftplugin = 1
40
41" Combine the new set of values with those previously included.
42if exists("b:undo_ftplugin")
43 let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
44endif
45if exists("b:browsefilter")
46 let s:browsefilter = b:browsefilter . s:browsefilter
47endif
48if exists("b:match_words")
49 let s:match_words = b:match_words . "," . s:match_words
50endif
51
52" Load the combined list of match_words for matchit.vim
53if exists("loaded_matchit")
54 let b:match_words = s:match_words
55endif
56
57" Change the :browse e filter to primarily show tcsh-related files.
58if has("gui_win32")
Bram Moolenaar8299df92004-07-10 09:47:34 +000059 let b:browsefilter="XHTML files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" . s:browsefilter
Bram Moolenaar071d4272004-06-13 20:20:40 +000060endif
61
62" Undo the stuff we changed.
63let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
64
65" Restore the saved compatibility options.
66let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010067unlet s:save_cpo