comparison runtime/ftplugin/html.vim @ 844:d3bbb5dd3913 v7.0f02

updated for version 7.0f02
author vimboss
date Thu, 27 Apr 2006 00:02:13 +0000
parents c2cae213194d
children b9740fb41986
comparison
equal deleted inserted replaced
843:9f279ebda751 844:d3bbb5dd3913
1 " Vim filetype plugin file 1 " Vim filetype plugin file
2 " Language: html 2 " Language: html
3 " Maintainer: Dan Sharp <dwsharp at hotmail dot com> 3 " Maintainer: Dan Sharp <dwsharp at hotmail dot com>
4 " Last Changed: 2004 Jul 08 4 " Last Changed: 2006 Apr 26
5 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin 5 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
6 6
7 if exists("b:did_ftplugin") | finish | endif 7 if exists("b:did_ftplugin") | finish | endif
8 let b:did_ftplugin = 1 8 let b:did_ftplugin = 1
9 9
12 let s:save_cpo = &cpo 12 let s:save_cpo = &cpo
13 set cpo-=C 13 set cpo-=C
14 14
15 setlocal commentstring=<!--%s--> 15 setlocal commentstring=<!--%s-->
16 16
17 if exists('&omnifunc')
18 " Distinguish between HTML versions
19 " To use with other HTML versions add another
20 " elseif condition to match proper DOCTYPE
17 setlocal omnifunc=htmlcomplete#CompleteTags 21 setlocal omnifunc=htmlcomplete#CompleteTags
18 22
19 " This part added as suggestion by Mikolaj Machowski, still be approved by Dan
20 " Sharp!
21 if &filetype == 'xhtml' 23 if &filetype == 'xhtml'
22 let b:html_omni_flavor = 'xhtml10s' 24 let b:html_omni_flavor = 'xhtml10s'
23 else 25 else
24 let b:html_omni_flavor = 'html401t' 26 let b:html_omni_flavor = 'html401t'
25 endif 27 endif
26
27 let i = 1 28 let i = 1
28 while i < 10 && i < line("$") 29 while i < 10 && i < line("$")
29 let line = getline(i) 30 let line = getline(i)
30 if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2' 31 if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2'
31 let b:html_omni_flavor = 'html32' 32 let b:html_omni_flavor = 'html32'
61 let b:html_omni_flavor = 'xhtml11' 62 let b:html_omni_flavor = 'xhtml11'
62 break 63 break
63 endif 64 endif
64 let i += 1 65 let i += 1
65 endwhile 66 endwhile
66 67 endif
67 68
68 " HTML: thanks to Johannes Zellner and Benji Fisher. 69 " HTML: thanks to Johannes Zellner and Benji Fisher.
69 if exists("loaded_matchit") 70 if exists("loaded_matchit")
70 let b:match_ignorecase = 1 71 let b:match_ignorecase = 1
71 let b:match_skip = 's:Comment' 72 let b:match_skip = 's:Comment'