blob: bea8c5c18a46a4dba84e88c7481da9b96aa1205a [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim filetype plugin file
Doug Kearns93197fd2024-01-14 20:59:02 +01002" 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
Doug Kearns93197fd2024-01-14 20:59:02 +01007" Last Change: 2009 Jan 20
8" 2024 Jan 14 by Vim Project (browsefilter)
Bram Moolenaar071d4272004-06-13 20:20:40 +00009
10if exists("b:did_ftplugin") | finish | endif
11let b:did_ftplugin = 1
12
13" Make sure the continuation lines below do not cause problems in
14" compatibility mode.
15let s:save_cpo = &cpo
16set cpo-=C
17
18setlocal commentstring=<!--%s-->
Bram Moolenaare37d50a2008-08-06 17:06:04 +000019setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
20
21setlocal formatoptions-=t
22if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1)
23 setlocal formatoptions+=croql
24endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26if exists("loaded_matchit")
27 let b:match_words = '<!--:-->,<!:>'
28endif
29
30" Change the :browse e filter to primarily show Java-related files.
Doug Kearns93197fd2024-01-14 20:59:02 +010031if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
Bram Moolenaar071d4272004-06-13 20:20:40 +000032 let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" .
Doug Kearns93197fd2024-01-14 20:59:02 +010033 \ "XML Files (*.xml)\t*.xml\n"
34 if has("win32")
35 let b:browsefilter .= "All Files (*.*)\t*\n"
36 else
37 let b:browsefilter .= "All Files (*)\t*\n"
38 endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000039endif
40
41" Undo the stuff we changed.
Bram Moolenaare37d50a2008-08-06 17:06:04 +000042let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
Bram Moolenaar071d4272004-06-13 20:20:40 +000043 \ " | unlet! b:matchwords b:browsefilter"
44
45" Restore the saved compatibility options.
46let &cpo = s:save_cpo
Bram Moolenaar84f72352012-03-11 15:57:40 +010047unlet s:save_cpo