tcsh.vim 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. " Vim filetype plugin file
  2. " Language: tcsh
  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 = "csh Files (*.csh)\t*.csh\n" .
  14. \ "All Files (*.*)\t*.*\n"
  15. runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.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 tcsh-related files.
  25. if has("gui_win32")
  26. let b:browsefilter="tcsh Scripts (*.tcsh)\t*.tcsh\n" . s:browsefilter
  27. endif
  28. " Undo the stuff we changed.
  29. let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin
  30. " Restore the saved compatibility options.
  31. let &cpo = s:save_cpo
  32. unlet s:save_cpo