annotate runtime/ftplugin/sh.vim @ 31938:96d6d31dd66b v9.0.1301

patch 9.0.1301: virtual text below empty line not displayed Commit: https://github.com/vim/vim/commit/9d9a20ee8799bafe9caac616fef11b7a26db6a8d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 11 13:49:01 2023 +0000 patch 9.0.1301: virtual text below empty line not displayed Problem: Virtual text below empty line not displayed. Solution: Adjust flags and computations. (closes https://github.com/vim/vim/issues/11959)
author Bram Moolenaar <Bram@vim.org>
date Sat, 11 Feb 2023 15:00:04 +0100
parents fee9eccee266
children d23645a0aca8
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
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
2 " Language: sh
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
4 " Previous Maintainer: Dan Sharp
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
5 " Last Change: 2022 Sep 07
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
7 if exists("b:did_ftplugin")
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
8 finish
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
9 endif
7
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
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
17 setlocal comments=:#
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
18 setlocal commentstring=#\ %s
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
19 setlocal formatoptions-=t formatoptions+=croql
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
20
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
21 let b:undo_ftplugin = "setl com< cms< fo<"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Shell: thanks to Johannes Zellner
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
24 if exists("loaded_matchit") && !exists("b:match_words")
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
25 let b:match_ignorecase = 0
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
26 let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
27 let b:match_words =
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
28 \ s:sol .. 'if\>:' .. s:sol.'elif\>:' .. s:sol.'else\>:' .. s:sol .. 'fi\>,' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
29 \ s:sol .. '\%(for\|while\)\>:' .. s:sol .. 'done\>,' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
30 \ s:sol .. 'case\>:' .. s:sol .. 'esac\>'
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
31 unlet s:sol
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
32 let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Change the :browse e filter to primarily show shell-related files.
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
36 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
37 let b:browsefilter = "Bourne Shell Scripts (*.sh)\t*.sh\n" ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
38 \ "Korn Shell Scripts (*.ksh)\t*.ksh\n" ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
39 \ "Bash Shell Scripts (*.bash)\t*.bash\n" ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
40 \ "All Files (*.*)\t*.*\n"
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
41 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " Restore the saved compatibility options.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 let &cpo = s:save_cpo
3410
94601b379f38 Updated runtime files. Add Dutch translations.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
46 unlet s:save_cpo
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
47
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28010
diff changeset
48 " vim: nowrap sw=2 sts=2 ts=8 noet: