Mercurial > vim
annotate runtime/ftplugin/zsh.vim @ 19835:b56266f40a71
Added tag v8.2.0473 for changeset 2ef25a007bb72e7e9de3019e3fa167f3f325c62d
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Mar 2020 15:15:05 +0200 |
parents | 847a300aa244 |
children | 29c5f168c6fd |
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> | |
19646 | 5 " Latest Revision: 2020-01-10 |
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') |
22 if !has('gui_running') && executable('less') | |
23 command! -buffer -nargs=1 RunHelp silent exe '!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 setlocal keywordprg=:RunHelp | |
30 setlocal makeprg=zsh\ -n\ --\ %:S | |
31 setlocal errorformat=%f:\ line\ %l:\ %m | |
32 let b:undo_ftplugin .= 'keywordprg< errorformat< makeprg<' | |
33 endif | |
1698 | 34 |
12968 | 35 let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>' |
2698
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
36 \ . ',\<case\>:^\s*([^)]*):\<esac\>' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
37 \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
38 let b:match_skip = 's:comment\|string\|heredoc\|subst' |
b6471224d2af
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
1698
diff
changeset
|
39 |
1698 | 40 let &cpo = s:cpo_save |
41 unlet s:cpo_save |