comparison runtime/ftplugin/zsh.vim @ 19646:847a300aa244

Update runtime files Commit: https://github.com/vim/vim/commit/b17893aa940dc7d45421f875f5d90855880aad27 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 14 08:19:51 2020 +0100 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Mar 2020 08:30:08 +0100
parents 45987b1b77dc
children 29c5f168c6fd
comparison
equal deleted inserted replaced
19645:c4e27eead327 19646:847a300aa244
1 " Vim filetype plugin file 1 " Vim filetype plugin file
2 " Language: Zsh shell script 2 " Language: Zsh shell script
3 " Maintainer: Christian Brabandt <cb@256bit.org> 3 " Maintainer: Christian Brabandt <cb@256bit.org>
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5 " Latest Revision: 2017-11-22 5 " Latest Revision: 2020-01-10
6 " License: Vim (see :h license) 6 " License: Vim (see :h license)
7 " Repository: https://github.com/chrisbra/vim-zsh 7 " Repository: https://github.com/chrisbra/vim-zsh
8 8
9 if exists("b:did_ftplugin") 9 if exists("b:did_ftplugin")
10 finish 10 finish
12 let b:did_ftplugin = 1 12 let b:did_ftplugin = 1
13 13
14 let s:cpo_save = &cpo 14 let s:cpo_save = &cpo
15 set cpo&vim 15 set cpo&vim
16 16
17 let b:undo_ftplugin = "setl com< cms< fo<" 17 setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
18 18
19 setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql 19 let b:undo_ftplugin = "setl com< cms< fo< "
20
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
20 34
21 let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>' 35 let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>'
22 \ . ',\<case\>:^\s*([^)]*):\<esac\>' 36 \ . ',\<case\>:^\s*([^)]*):\<esac\>'
23 \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>' 37 \ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
24 let b:match_skip = 's:comment\|string\|heredoc\|subst' 38 let b:match_skip = 's:comment\|string\|heredoc\|subst'