tcsh.vim 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. " Vim filetype plugin file
  2. " Language: tcsh
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Previous Maintainer: Dan Sharp
  5. " Last Change: 2024 Jan 14
  6. if exists("b:did_ftplugin")
  7. finish
  8. endif
  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. if has("win32")
  15. let s:browsefilter ..= "All Files (*.*)\t*\n"
  16. else
  17. let s:browsefilter ..= "All Files (*)\t*\n"
  18. endif
  19. runtime! ftplugin/csh.vim ftplugin/csh_*.vim ftplugin/csh/*.vim
  20. let b:did_ftplugin = 1
  21. " Override our defaults if these were set by an included ftplugin.
  22. if exists("b:undo_ftplugin")
  23. let s:undo_ftplugin = b:undo_ftplugin
  24. endif
  25. if exists("b:browsefilter")
  26. let s:browsefilter = b:browsefilter
  27. endif
  28. if (has("gui_win32") || has("gui_gtk")) &&
  29. \ (!exists("b:browsefilter") || exists("b:csh_set_browsefilter"))
  30. let b:browsefilter = "tcsh Scripts (*.tcsh)\t*.tcsh\n" .. s:browsefilter
  31. let s:undo_ftplugin = "unlet! b:browsefilter | " .. s:undo_ftplugin
  32. endif
  33. let b:undo_ftplugin = s:undo_ftplugin
  34. let &cpo = s:save_cpo
  35. unlet s:save_cpo