Skip to content

Commit c45e16a

Browse files
committed
runtime(zsh): Update runtime files
closes: #19113 Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 46cc91e commit c45e16a

2 files changed

Lines changed: 21 additions & 19 deletions

File tree

runtime/ftplugin/zsh.vim

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
" Language: Zsh shell script
33
" Maintainer: Christian Brabandt <cb@256bit.org>
44
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5-
" Latest Revision: 2024 Sep 19
5+
" Latest Revision: 2025 Jul 23
66
" License: Vim (see :h license)
77
" Repository: https://github.com/chrisbra/vim-zsh
8-
" Last Change:
9-
" 2025 Jul 23 by Vim Project (use :hor term #17822)
108

119
if exists("b:did_ftplugin")
1210
finish
@@ -20,9 +18,14 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
2018

2119
let b:undo_ftplugin = "setl com< cms< fo< "
2220

21+
if get(g:, 'zsh_fold_enable', 0)
22+
setlocal foldmethod=syntax
23+
let b:undo_ftplugin .= "fdm< "
24+
endif
25+
2326
if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
2427
if exists(':terminal') == 2
25-
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor term zsh -c "autoload -Uz run-help; run-help <args>"'
28+
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor :term zsh -c "autoload -Uz run-help; run-help <args>"'
2629
else
2730
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
2831
endif

runtime/syntax/zsh.vim

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: Zsh shell script
33
" Maintainer: Christian Brabandt <cb@256bit.org>
44
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
5-
" Latest Revision: 2024 Jan 04
5+
" Latest Revision: 2025 Feb 18
66
" License: Vim (see :h license)
77
" Repository: https://github.com/chrisbra/vim-zsh
88

@@ -37,9 +37,6 @@ endfunction
3737
let s:contained=s:ContainedGroup()
3838

3939
syn iskeyword @,48-57,_,192-255,#,-
40-
if get(g:, 'zsh_fold_enable', 0)
41-
setlocal foldmethod=syntax
42-
endif
4340

4441
syn match zshQuoted '\\.'
4542
syn match zshPOSIXQuoted '\\[xX][0-9a-fA-F]\{1,2}'
@@ -157,6 +154,8 @@ syn case ignore
157154
syn match zshOptStart
158155
\ /\v^\s*%(%(un)?setopt|set\s+[-+]o)/
159156
\ nextgroup=zshOption skipwhite
157+
158+
" this list is generated using the make-options.zsh script and the zsh source repository
160159
syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
161160
\ auto_cd no_auto_cd autocd noautocd auto_pushd no_auto_pushd autopushd noautopushd cdable_vars
162161
\ no_cdable_vars cdablevars nocdablevars cd_silent no_cd_silent cdsilent nocdsilent chase_dots
@@ -193,16 +192,16 @@ syn keyword zshOption nextgroup=zshOption,zshComment skipwhite contained
193192
\ nonumericglobsort rc_expand_param no_rc_expand_param rcexpandparam norcexpandparam rematch_pcre
194193
\ no_rematch_pcre rematchpcre norematchpcre sh_glob no_sh_glob shglob noshglob unset no_unset nounset
195194
\ warn_create_global no_warn_create_global warncreateglobal nowarncreateglobal warn_nested_var
196-
\ no_warn_nested_var warnnestedvar no_warnnestedvar append_history no_append_history appendhistory
197-
\ noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history no_extended_history
198-
\ extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber histallowclobber
199-
\ nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep hist_expire_dups_first
200-
\ no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst hist_fcntl_lock
201-
\ no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups no_hist_find_no_dups
202-
\ histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups histignorealldups
203-
\ nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups nohistignoredups
204-
\ hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace hist_lex_words
205-
\ no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
195+
\ no_warn_nested_var warnnestedvar no_warnnestedvar nowarnnestedvar append_history no_append_history
196+
\ appendhistory noappendhistory bang_hist no_bang_hist banghist nobanghist extended_history
197+
\ no_extended_history extendedhistory noextendedhistory hist_allow_clobber no_hist_allow_clobber
198+
\ histallowclobber nohistallowclobber hist_beep no_hist_beep histbeep nohistbeep
199+
\ hist_expire_dups_first no_hist_expire_dups_first histexpiredupsfirst nohistexpiredupsfirst
200+
\ hist_fcntl_lock no_hist_fcntl_lock histfcntllock nohistfcntllock hist_find_no_dups
201+
\ no_hist_find_no_dups histfindnodups nohistfindnodups hist_ignore_all_dups no_hist_ignore_all_dups
202+
\ histignorealldups nohistignorealldups hist_ignore_dups no_hist_ignore_dups histignoredups
203+
\ nohistignoredups hist_ignore_space no_hist_ignore_space histignorespace nohistignorespace
204+
\ hist_lex_words no_hist_lex_words histlexwords nohistlexwords hist_no_functions no_hist_no_functions
206205
\ histnofunctions nohistnofunctions hist_no_store no_hist_no_store histnostore nohistnostore
207206
\ hist_reduce_blanks no_hist_reduce_blanks histreduceblanks nohistreduceblanks hist_save_by_copy
208207
\ no_hist_save_by_copy histsavebycopy nohistsavebycopy hist_save_no_dups no_hist_save_no_dups
@@ -334,7 +333,7 @@ hi def link zshKeyword Keyword
334333
hi def link zshFunction None
335334
hi def link zshKSHFunction zshFunction
336335
hi def link zshHereDoc String
337-
hi def link zshOperator None
336+
hi def link zshOperator Operator
338337
hi def link zshRedir Operator
339338
hi def link zshVariable None
340339
hi def link zshVariableDef zshVariable

0 commit comments

Comments
 (0)