Mercurial > vim
annotate runtime/ftplugin/csh.vim @ 31430:e5e95e8c78a7
Update runtime files
Commit: https://github.com/vim/vim/commit/7db29e4b5c3a347d24ca5062ddaa5cf4c4d54b9c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 11 15:53:04 2022 +0000
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 11 Dec 2022 17:00:05 +0100 |
parents | c968191a8557 |
children | 09e8f7ac05e0 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
25973 | 2 " Language: csh |
3 " Maintainer: Doug Kearns <dougkearns@gmail.com> | |
28010 | 4 " Previous Maintainer: Dan Sharp |
25973 | 5 " Contributor: Johannes Zellner <johannes@zellner.org> |
6 " Last Change: 2021 Oct 15 | |
7 | 7 |
8 if exists("b:did_ftplugin") | finish | endif | |
9 let b:did_ftplugin = 1 | |
10 | |
11 let s:save_cpo = &cpo | |
12 set cpo-=C | |
13 | |
25973 | 14 setlocal comments=:# |
7 | 15 setlocal commentstring=#%s |
16 setlocal formatoptions-=t | |
17 setlocal formatoptions+=crql | |
18 | |
25973 | 19 let b:undo_ftplugin = "setlocal com< cms< fo<" |
20 | |
7 | 21 " Csh: thanks to Johannes Zellner |
22 " - Both foreach and end must appear alone on separate lines. | |
23 " - The words else and endif must appear at the beginning of input lines; | |
24 " the if must appear alone on its input line or after an else. | |
25 " - Each case label and the default label must appear at the start of a | |
26 " line. | |
27 " - while and end must appear alone on their input lines. | |
25973 | 28 if exists("loaded_matchit") && !exists("b:match_words") |
29 let s:line_start = '\%(^\s*\)\@<=' | |
30 let b:match_words = | |
31 \ s:line_start .. 'if\s*(.*)\s*then\>:' .. | |
32 \ s:line_start .. 'else\s\+if\s*(.*)\s*then\>:' .. s:line_start .. 'else\>:' .. | |
33 \ s:line_start .. 'endif\>,' .. | |
34 \ s:line_start .. '\%(\<foreach\s\+\h\w*\|while\)\s*(:' .. | |
35 \ '\<break\>:\<continue\>:' .. | |
36 \ s:line_start .. 'end\>,' .. | |
37 \ s:line_start .. 'switch\s*(:' .. | |
38 \ s:line_start .. 'case\s\+:' .. s:line_start .. 'default\>:\<breaksw\>:' .. | |
39 \ s:line_start .. 'endsw\>' | |
40 unlet s:line_start | |
41 let b:undo_ftplugin ..= " | unlet b:match_words" | |
7 | 42 endif |
43 | |
25973 | 44 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") |
45 let b:browsefilter="csh Scripts (*.csh)\t*.csh\n" .. | |
46 \ "All Files (*.*)\t*.*\n" | |
47 let b:undo_ftplugin ..= " | unlet b:browsefilter" | |
7 | 48 endif |
49 | |
50 let &cpo = s:save_cpo | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
51 unlet s:save_cpo |