dtd.vim 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. " Vim filetype plugin file
  2. " Language: dtd
  3. "
  4. " This runtime file is looking for a new maintainer.
  5. "
  6. " Former maintainer: Dan Sharp
  7. " Last Changed: 20 Jan 2009
  8. if exists("b:did_ftplugin") | finish | endif
  9. let b:did_ftplugin = 1
  10. " Make sure the continuation lines below do not cause problems in
  11. " compatibility mode.
  12. let s:save_cpo = &cpo
  13. set cpo-=C
  14. setlocal commentstring=<!--%s-->
  15. setlocal comments=s:<!--,m:\ \ \ \ \ ,e:-->
  16. setlocal formatoptions-=t
  17. if !exists("g:ft_dtd_autocomment") || (g:ft_dtd_autocomment == 1)
  18. setlocal formatoptions+=croql
  19. endif
  20. if exists("loaded_matchit")
  21. let b:match_words = '<!--:-->,<!:>'
  22. endif
  23. " Change the :browse e filter to primarily show Java-related files.
  24. if has("gui_win32")
  25. let b:browsefilter="DTD Files (*.dtd)\t*.dtd\n" .
  26. \ "XML Files (*.xml)\t*.xml\n" .
  27. \ "All Files (*.*)\t*.*\n"
  28. endif
  29. " Undo the stuff we changed.
  30. let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" .
  31. \ " | unlet! b:matchwords b:browsefilter"
  32. " Restore the saved compatibility options.
  33. let &cpo = s:save_cpo
  34. unlet s:save_cpo