xsd.vim 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. " Vim filetype plugin file
  2. " Language: xsd
  3. " Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
  4. " Last Changed: 20 Jan 2009
  5. " URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
  6. if exists("b:did_ftplugin") | finish | endif
  7. " Make sure the continuation lines below do not cause problems in
  8. " compatibility mode.
  9. let s:save_cpo = &cpo
  10. set cpo-=C
  11. " Define some defaults in case the included ftplugins don't set them.
  12. let s:undo_ftplugin = ""
  13. let s:browsefilter = "XML Files (*.xml)\t*.xml\n" .
  14. \ "All Files (*.*)\t*.*\n"
  15. runtime! ftplugin/xml.vim ftplugin/xml_*.vim ftplugin/xml/*.vim
  16. let b:did_ftplugin = 1
  17. " Override our defaults if these were set by an included ftplugin.
  18. if exists("b:undo_ftplugin")
  19. let s:undo_ftplugin = b:undo_ftplugin
  20. endif
  21. if exists("b:browsefilter")
  22. let s:browsefilter = b:browsefilter
  23. endif
  24. " Change the :browse e filter to primarily show xsd-related files.
  25. if has("gui_win32")
  26. let b:browsefilter="XSD Files (*.xsd)\t*.xsd\n" . s:browsefilter
  27. endif
  28. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin
  29. " Restore the saved compatibility options.
  30. let &cpo = s:save_cpo
  31. unlet s:save_cpo