1 " Vim filetype plugin file
3 " Maintainer: Dan Sharp <dwsharp at hotmail dot com>
4 " Last Changed: 2003 Sep 29
5 " URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
7 if exists("b:did_ftplugin") | finish | endif
10 " Make sure the continuation lines below do not cause problems in
15 setlocal commentstring=<!--%s-->
17 " XML: thanks to Johannes Zellner and Akbar Ibrahim
19 " - don't match empty tags <fred/>
20 " - match <!--, --> style comments (but not --, --)
21 " - match <!, > inlined dtd's. This is not perfect, as it
22 " gets confused for example by
24 if exists("loaded_matchit")
25 let b:match_ignorecase=0
28 \ '<\@<=!\[CDATA\[:]]>,'.
31 \ '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,'.
32 \ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>'
36 " For Omni completion, by Mikolaj Machowski.
38 setlocal ofu=xmlcomplete#CompleteTags
40 command! -nargs=+ XMLns call xmlcomplete#CreateConnection(<f-args>)
41 command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
44 " Change the :browse e filter to primarily show xml-related files.
46 let b:browsefilter="XML Files (*.xml)\t*.xml\n" .
47 \ "DTD Files (*.dtd)\t*.dtd\n" .
48 \ "All Files (*.*)\t*.*\n"
51 " Undo the stuff we changed.
52 let b:undo_ftplugin = "setlocal cms<" .
53 \ " | unlet! b:match_ignorecase b:match_words b:browsefilter"
55 " Restore the saved compatibility options.