config.vim 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. " Vim filetype plugin file
  2. " Language: config
  3. "
  4. " This runtime file is looking for a new maintainer.
  5. "
  6. " Former maintainer: Dan Sharp
  7. " Last Change: 2009 Jan 20
  8. " 2024 Jan 14 by Vim Project (browsefilter)
  9. if exists("b:did_ftplugin") | finish | endif
  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. " Define some defaults in case the included ftplugins don't set them.
  15. let s:undo_ftplugin = ""
  16. let s:browsefilter = "Bourne Shell Files (*.sh)\t*.sh\n"
  17. if has("win32")
  18. let s:browsefilter .= "All Files (*.*)\t*\n"
  19. else
  20. let s:browsefilter .= "All Files (*)\t*\n"
  21. endif
  22. let s:match_words = ""
  23. runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim
  24. let b:did_ftplugin = 1
  25. " Override our defaults if these were set by an included ftplugin.
  26. if exists("b:undo_ftplugin")
  27. let s:undo_ftplugin = b:undo_ftplugin
  28. endif
  29. if exists("b:browsefilter")
  30. let s:browsefilter = b:browsefilter
  31. endif
  32. " Change the :browse e filter to primarily show configure-related files.
  33. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  34. let b:browsefilter="Configure Scripts (configure.*, config.*)\tconfigure*;config.*\n" .
  35. \ s:browsefilter
  36. endif
  37. " Undo the stuff we changed.
  38. let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin
  39. " Restore the saved compatibility options.
  40. let &cpo = s:save_cpo
  41. unlet s:save_cpo