Mercurial > vim
annotate runtime/ftplugin/sh.vim @ 29033:0059a17d7a2a
Added tag v8.2.5038 for changeset 361b46a07f5edd372b3a3ca580bdbf06bd425bb9
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 May 2022 15:15:06 +0200 |
parents | c968191a8557 |
children | fee9eccee266 |
rev | line source |
---|---|
7 | 1 " Vim filetype plugin file |
2 " Language: sh | |
28010 | 3 " |
4 " This runtime file is looking for a new maintainer. | |
5 " | |
6 " Former maintainer: Dan Sharp | |
2034 | 7 " Last Changed: 20 Jan 2009 |
7 | 8 |
9 if exists("b:did_ftplugin") | finish | endif | |
10 let b:did_ftplugin = 1 | |
11 | |
12 " Make sure the continuation lines below do not cause problems in | |
13 " compatibility mode. | |
14 let s:save_cpo = &cpo | |
15 set cpo-=C | |
16 | |
17 setlocal commentstring=#%s | |
18 | |
19 " Shell: thanks to Johannes Zellner | |
20 if exists("loaded_matchit") | |
21 let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line | |
22 let b:match_words = | |
23 \ s:sol.'if\>:' . s:sol.'elif\>:' . s:sol.'else\>:' . s:sol. 'fi\>,' . | |
24 \ s:sol.'\%(for\|while\)\>:' . s:sol. 'done\>,' . | |
25 \ s:sol.'case\>:' . s:sol. 'esac\>' | |
26 endif | |
27 | |
28 " Change the :browse e filter to primarily show shell-related files. | |
29 if has("gui_win32") | |
30 let b:browsefilter="Bourne Shell Scripts (*.sh)\t*.sh\n" . | |
31 \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" . | |
32 \ "Bash Shell Scripts (*.bash)\t*.bash\n" . | |
33 \ "All Files (*.*)\t*.*\n" | |
34 endif | |
35 | |
36 " Undo the stuff we changed. | |
37 let b:undo_ftplugin = "setlocal cms< | unlet! b:browsefilter b:match_words" | |
38 | |
39 " Restore the saved compatibility options. | |
40 let &cpo = s:save_cpo | |
3410
94601b379f38
Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents:
2034
diff
changeset
|
41 unlet s:save_cpo |