ant.vim 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. " Vim filetype plugin file
  2. " Language: ant
  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 Ant-related files.
  25. if has("gui_win32")
  26. let b:browsefilter = "Build Files (build.xml)\tbuild.xml\n" .
  27. \ "Java Files (*.java)\t*.java\n" .
  28. \ "Properties Files (*.prop*)\t*.prop*\n" .
  29. \ "Manifest Files (*.mf)\t*.mf\n" .
  30. \ s:browsefilter
  31. endif
  32. " Undo the stuff we changed.
  33. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin
  34. " Restore the saved compatibility options.
  35. let &cpo = s:save_cpo
  36. unlet s:save_cpo