123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- if exists("b:did_ftplugin") | finish | endif
- let b:did_ftplugin = 1
- let s:save_cpo = &cpo
- set cpo&vim
- setlocal commentstring=<!--\ %s\ -->
- setlocal comments=s:<!--,e:-->
- setlocal formatoptions-=t
- setlocal formatoptions+=croql
- setlocal formatexpr=xmlformat#Format()
- " <!ENTITY gt ">
- if exists("loaded_matchit")
- let b:match_ignorecase=0
- let b:match_words =
- \ '<:>,' .
- \ '<\@<=!\[CDATA\[:]]>,'.
- \ '<\@<=!--:-->,'.
- \ '<\@<=?\k\+:?>,'.
- \ '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,'.
- \ '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>'
- endif
- if exists('&ofu')
- setlocal ofu=xmlcomplete#CompleteTags
- endif
- command! -nargs=+ XMLns call xmlcomplete#CreateConnection(<f-args>)
- command! -nargs=? XMLent call xmlcomplete#CreateEntConnection(<f-args>)
- if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
- let b:browsefilter="XML Files (*.xml)\t*.xml\n" .
- \ "DTD Files (*.dtd)\t*.dtd\n" .
- \ "XSD Files (*.xsd)\t*.xsd\n"
- if has("win32")
- let b:browsefilter .= "All Files (*.*)\t*\n"
- else
- let b:browsefilter .= "All Files (*)\t*\n"
- endif
- endif
- let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions< formatexpr< " .
- \ " | unlet! b:match_ignorecase b:match_words b:browsefilter"
- let &cpo = s:save_cpo
- unlet s:save_cpo
|