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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: sh
28010
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
3 "
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
4 " This runtime file is looking for a new maintainer.
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
5 "
c968191a8557 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
6 " Former maintainer: Dan Sharp
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
7 " Last Changed: 20 Jan 2009
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 if exists("b:did_ftplugin") | finish | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Make sure the continuation lines below do not cause problems in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " compatibility mode.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 let s:save_cpo = &cpo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 set cpo-=C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 setlocal commentstring=#%s
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Shell: thanks to Johannes Zellner
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 if exists("loaded_matchit")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 let b:match_words =
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 \ s:sol.'if\>:' . s:sol.'elif\>:' . s:sol.'else\>:' . s:sol. 'fi\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 \ s:sol.'\%(for\|while\)\>:' . s:sol. 'done\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 \ s:sol.'case\>:' . s:sol. 'esac\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " Change the :browse e filter to primarily show shell-related files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 if has("gui_win32")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 let b:browsefilter="Bourne Shell Scripts (*.sh)\t*.sh\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 \ "Bash Shell Scripts (*.bash)\t*.bash\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 \ "All Files (*.*)\t*.*\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Undo the stuff we changed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 let b:undo_ftplugin = "setlocal cms< | unlet! b:browsefilter b:match_words"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Restore the saved compatibility options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
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