Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 1 | " Vim filetype plugin file |
| 2 | " Language: Tcl |
| 3 | " Maintainer: Robert L Hicks <sigzero@gmail.com> |
| 4 | " Latest Revision: 2009-05-01 |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 5 | " 2024 Jan 14 by Vim Project (browsefilter) |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 6 | " 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring') |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 7 | |
| 8 | if exists("b:did_ftplugin") |
| 9 | finish |
| 10 | endif |
| 11 | let b:did_ftplugin = 1 |
| 12 | |
| 13 | " Make sure the continuation lines below do not cause problems in |
| 14 | " compatibility mode. |
| 15 | let s:cpo_save = &cpo |
| 16 | set cpo-=C |
| 17 | |
| 18 | setlocal comments=:# |
Riley Bruins | 0a08306 | 2024-06-03 20:40:45 +0200 | [diff] [blame] | 19 | setlocal commentstring=#\ %s |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 20 | setlocal formatoptions+=croql |
| 21 | |
| 22 | " Change the browse dialog on Windows to show mainly Tcl-related files |
Doug Kearns | 93197fd | 2024-01-14 20:59:02 +0100 | [diff] [blame] | 23 | if (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 Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 31 | endif |
| 32 | |
| 33 | "----------------------------------------------------------------------------- |
| 34 | |
| 35 | " Undo the stuff we changed. |
| 36 | let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< kp<" . |
| 37 | \ " | unlet! b:browsefilter" |
| 38 | |
| 39 | " Restore the saved compatibility options. |
| 40 | let &cpo = s:cpo_save |
Bram Moolenaar | 84f7235 | 2012-03-11 15:57:40 +0100 | [diff] [blame] | 41 | unlet s:cpo_save |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 42 | |
| 43 | " vim: set et ts=4 sw=4 tw=78: |