7
|
1 " Vim filetype plugin file
|
|
2 " Language: html
|
|
3 " Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
15
|
4 " Last Changed: 2004 Jul 08
|
7
|
5 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
|
|
6
|
|
7 if exists("b:did_ftplugin") | finish | endif
|
|
8 let b:did_ftplugin = 1
|
|
9
|
|
10 " Make sure the continuation lines below do not cause problems in
|
|
11 " compatibility mode.
|
|
12 let s:save_cpo = &cpo
|
|
13 set cpo-=C
|
|
14
|
|
15 setlocal commentstring=<!--%s-->
|
|
16
|
|
17 " HTML: thanks to Johannes Zellner and Benji Fisher.
|
|
18 if 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>'
|
|
25 endif
|
|
26
|
|
27 " Change the :browse e filter to primarily show HTML-related files.
|
|
28 if has("gui_win32")
|
15
|
29 let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
|
7
|
30 \ "JavaScript Files (*.js)\t*.js\n" .
|
|
31 \ "Cascading StyleSheets (*.css)\t*.css\n" .
|
|
32 \ "All Files (*.*)\t*.*\n"
|
|
33 endif
|
|
34
|
|
35 " Undo the stuff we changed.
|
|
36 let 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.
|
|
40 let &cpo = s:save_cpo
|