blob: 214d9c256de969784dadef5b2a9f0591ddb133b2 [file] [log] [blame]
Bram Moolenaar5c736222010-01-06 20:54:52 +01001" Vim filetype plugin file
2" Language: Tcl
3" Maintainer: Robert L Hicks <sigzero@gmail.com>
4" Latest Revision: 2009-05-01
Doug Kearns93197fd2024-01-14 20:59:02 +01005" 2024 Jan 14 by Vim Project (browsefilter)
Riley Bruins0a083062024-06-03 20:40:45 +02006" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
Bram Moolenaar5c736222010-01-06 20:54:52 +01007
8if exists("b:did_ftplugin")
9 finish
10endif
11let b:did_ftplugin = 1
12
13" Make sure the continuation lines below do not cause problems in
14" compatibility mode.
15let s:cpo_save = &cpo
16set cpo-=C
17
18setlocal comments=:#
Riley Bruins0a083062024-06-03 20:40:45 +020019setlocal commentstring=#\ %s
Bram Moolenaar5c736222010-01-06 20:54:52 +010020setlocal formatoptions+=croql
21
22" Change the browse dialog on Windows to show mainly Tcl-related files
Doug Kearns93197fd2024-01-14 20:59:02 +010023if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
24 let b:browsefilter = "Tcl Source Files (*.tcl)\t*.tcl\n" .
25 \ "Tcl Test Files (*.test)\t*.test\n"
26 if has("win32")
27 let b:browsefilter .= "All Files (*.*)\t*\n"
28 else
29 let b:browsefilter .= "All Files (*)\t*\n"
30 endif
Bram Moolenaar5c736222010-01-06 20:54:52 +010031endif
32
33"-----------------------------------------------------------------------------
34
35" Undo the stuff we changed.
36let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" .
37 \ " | unlet! b:browsefilter"
38
39" Restore the saved compatibility options.
40let &cpo = s:cpo_save
Bram Moolenaar84f72352012-03-11 15:57:40 +010041unlet s:cpo_save
Bram Moolenaar5c736222010-01-06 20:54:52 +010042
43" vim: set et ts=4 sw=4 tw=78: