blob: a046118c70660f8ab5897ff023ede19eed6906ae [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
2" Language: dtd
Bram Moolenaar1588bc82022-03-08 21:35:07 +00003"
4" This runtime file is looking for a new maintainer.
5"
6" Former maintainer: Dan Sharp
Bram Moolenaar5c736222010-01-06 20:54:52 +01007" Last Changed: 20 Jan 2009
Bram Moolenaar071d4272004-06-13 20:20:40 +00008
9if exists("b:did_ftplugin") | finish | endif
10let b:did_ftplugin = 1
11
12" Make sure the continuation lines below do not cause problems in
13" compatibility mode.
14let s:save_cpo = &cpo
15set cpo-=C
16
17setlocal commentstring=<!--%s-->
Bram Moolenaare37d50a2008-08-06 17:06:04 +000018setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
19
20setlocal formatoptions-=t
21if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1)
22 setlocal formatoptions+=croql
23endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000024
25if exists("loaded_matchit")
26 let b:match_words = '<!--:-->,<!:>'
27endif
28
29" Change the :browse e filter to primarily show Java-related files.
30if has("gui_win32")
31 let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" .
32 \ "XML Files (*.xml)\t*.xml\n" .
33 \ "All Files (*.*)\t*.*\n"
34endif
35
36" Undo the stuff we changed.
Bram Moolenaare37d50a2008-08-06 17:06:04 +000037let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
Bram Moolenaar071d4272004-06-13 20:20:40 +000038 \ " | unlet! b:matchwords b:browsefilter"
39
40" Restore the saved compatibility options.
41let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010042unlet s:save_cpo