Mercurial > vim
annotate runtime/ftplugin/zsh.vim @ 23461:d4c85ce037aa
Added tag v8.2.2273 for changeset 09868c86a97fefdf75d8760f26df42dd88ac7110
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 02 Jan 2021 16:00:04 +0100 |
parents | 29c5f168c6fd |
children | f0d7cb510ce3 |
rev | line source |
---|---|
375 | 1 " Vim filetype plugin file |
11914 | 2 " Language: Zsh shell script |
3 " Maintainer: Christian Brabandt <cb@256bit.org> | |
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> | |
23047 | 5 " Latest Revision: 2020-09-01 |
11914 | 6 " License: Vim (see :h license) |
7 " Repository: https://github.com/chrisbra/vim-zsh | |
375 | 8 |
9 if exists("b:did_ftplugin") | |
10 finish | |
11 endif | |
12 let b:did_ftplugin = 1 | |
13 | |
1698 | 14 let s:cpo_save = &cpo |
15 set cpo&vim | |
16 | |
19646 | 17 setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql |
18 | |
19 let b:undo_ftplugin = "setl com< cms< fo< " | |
375 | 20 |
19646 | 21 if executable('zsh') |
23047 | 22 if !has('gui_running') && executable('less') |
23 command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw! | |
24 elseif has('terminal') | |
25 command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"' | |
26 else | |
27 command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"') | |
28 endif | |
29 if !exists('current_compiler') | |
30 compiler zsh | |
31 endif | |
19646 | 32 setlocal keywordprg=:RunHelp |
23047 | 33 let b:undo_ftplugin .= 'keywordprg<' |
19646 | 34 endif |
1698 | 35 |
23047 | 36 let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>' |
2698
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
37 \ . ',\<case\>:^\s*([^)]*):\<esac\>' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
38 \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
39 let b:match_skip = 's:comment\|string\|heredoc\|subst' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
40 |
1698 | 41 let &cpo = s:cpo_save |
42 unlet s:cpo_save |