blob: 7334b1584c7a4b22160bf49c5a7858fe3b4d1fdf [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: html
3" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
4" Last Changed: 2004 May 11
5" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
6
7if exists("b:did_ftplugin") | finish | endif
8let b:did_ftplugin = 1
9
10" Make sure the continuation lines below do not cause problems in
11" compatibility mode.
12let s:save_cpo = &cpo
13set cpo-=C
14
15setlocal commentstring=<!--%s-->
16
17" HTML: thanks to Johannes Zellner and Benji Fisher.
18if exists("loaded_matchit")
19 let b:match_ignorecase = 1
20 let b:match_skip = 's:Comment'
21 let b:match_words = '<:>,' .
22 \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
23 \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
24 \ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
25endif
26
27" Change the :browse e filter to primarily show HTML-related files.
28if has("gui_win32")
29 let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm*\n" .
30 \ "JavaScript Files (*.js)\t*.js\n" .
31 \ "Cascading StyleSheets (*.css)\t*.css\n" .
32 \ "All Files (*.*)\t*.*\n"
33endif
34
35" Undo the stuff we changed.
36let b:undo_ftplugin = "setlocal commentstring<"
37 \ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
38
39" Restore the saved compatibility options.
40let &cpo = s:save_cpo