tcl.vim 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. " Vim filetype plugin file
  2. " Language: Tcl
  3. " Maintainer: Robert L Hicks <sigzero@gmail.com>
  4. " Latest Revision: 2009-05-01
  5. " 2024 Jan 14 by Vim Project (browsefilter)
  6. " 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
  7. if exists("b:did_ftplugin")
  8. finish
  9. endif
  10. let b:did_ftplugin = 1
  11. " Make sure the continuation lines below do not cause problems in
  12. " compatibility mode.
  13. let s:cpo_save = &cpo
  14. set cpo-=C
  15. setlocal comments=:#
  16. setlocal commentstring=#\ %s
  17. setlocal formatoptions+=croql
  18. " Change the browse dialog on Windows to show mainly Tcl-related files
  19. if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
  20. let b:browsefilter = "Tcl Source Files (*.tcl)\t*.tcl\n" .
  21. \ "Tcl Test Files (*.test)\t*.test\n"
  22. if has("win32")
  23. let b:browsefilter .= "All Files (*.*)\t*\n"
  24. else
  25. let b:browsefilter .= "All Files (*)\t*\n"
  26. endif
  27. endif
  28. "-----------------------------------------------------------------------------
  29. " Undo the stuff we changed.
  30. let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" .
  31. \ " | unlet! b:browsefilter"
  32. " Restore the saved compatibility options.
  33. let &cpo = s:cpo_save
  34. unlet s:cpo_save
  35. " vim: set et ts=4 sw=4 tw=78: