diff options
author | Christian Clason <c.clason@uni-graz.at> | 2025-01-05 16:45:54 +0100 |
---|---|---|
committer | Christian Clason <ch.clason+github@icloud.com> | 2025-01-05 17:13:00 +0100 |
commit | bd2a4edf1b9390521d822fc990369f00694ba320 (patch) | |
tree | cc78aa15cd97a885ddc91b03eb1dfc8ba1906e82 | |
parent | 847c28f6f6ccdfa6d7887605b84137e00e5f7968 (diff) | |
download | rneovim-bd2a4edf1b9390521d822fc990369f00694ba320.tar.gz rneovim-bd2a4edf1b9390521d822fc990369f00694ba320.tar.bz2 rneovim-bd2a4edf1b9390521d822fc990369f00694ba320.zip |
vim-patch:202ebc6: runtime(zsh): sync syntax script with upstream repo
fixes: vim/vim#16371
https://github.com/vim/vim/commit/202ebc6ced6c5d7c0cdd9a79867af14aab39f75d
Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/syntax/zsh.vim | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim index 084f8cdb41..04b39aeac0 100644 --- a/runtime/syntax/zsh.vim +++ b/runtime/syntax/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt <cb@256bit.org> " Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2022-07-26 +" Latest Revision: 2024 Jan 04 " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -48,8 +48,9 @@ syn match zshPOSIXQuoted '\\u[0-9a-fA-F]\{1,4}' syn match zshPOSIXQuoted '\\U[1-9a-fA-F]\{1,8}' syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ - \ contains=zshQuoted,@zshDerefs,@zshSubstQuoted fold + \ contains=@Spell,zshQuoted,@zshDerefs,@zshSubstQuoted fold syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold + \ contains=@Spell syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ \ skip=+\\[\\']+ end=+'+ contains=zshPOSIXQuoted,zshQuoted syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' @@ -68,7 +69,7 @@ syn keyword zshConditional if then elif else fi esac select syn keyword zshCase case nextgroup=zshCaseWord skipwhite syn match zshCaseWord /\S\+/ nextgroup=zshCaseIn skipwhite contained transparent -syn keyword zshCaseIn in nextgroup=zshCasePattern skipwhite skipnl contained +syn keyword zshCaseIn in nextgroup=zshComment,zshCasePattern skipwhite skipnl contained syn match zshCasePattern /\S[^)]*)/ contained syn keyword zshRepeat while until repeat @@ -94,22 +95,24 @@ syn match zshRedir '|\@1<!|&\=|\@!' syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\z([^<]\S*\)' - \ end='^\z1\>' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\z1$' + \ contains=@Spell,@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<\s*\\\z(\S\+\)' - \ end='^\z1\>' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start='<\@<!<<-\s*\\\=\z(\S\+\)' - \ end='^\s*\z1\>' - \ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString + \ end='^\t*\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+ - \ end='^\z1\>' + \ end='^\z1$' + \ contains=@Spell syn region zshHereDoc matchgroup=zshRedir \ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+ - \ end='^\s*\z1\>' + \ end='^\t*\z1$' + \ contains=@Spell syn match zshVariable '\<\h\w*' contained |