Skip to content

Commit 202ebc6

Browse files
committed
runtime(zsh): sync syntax script with upstream repo
fixes: #16371 Signed-off-by: Christian Brabandt <[email protected]>
1 parent 8a27d97 commit 202ebc6

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

runtime/syntax/zsh.vim

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" Language: Zsh shell script
33
" Maintainer: Christian Brabandt <[email protected]>
44
" Previous Maintainer: Nikolai Weibull <[email protected]>
5-
" Latest Revision: 2022-07-26
5+
" Latest Revision: 2024 Jan 04
66
" License: Vim (see :h license)
77
" Repository: https://github.com/chrisbra/vim-zsh
88

@@ -48,8 +48,9 @@ syn match zshPOSIXQuoted '\\u[0-9a-fA-F]\{1,4}'
4848
syn match zshPOSIXQuoted '\\U[1-9a-fA-F]\{1,8}'
4949

5050
syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+
51-
\ contains=zshQuoted,@zshDerefs,@zshSubstQuoted fold
51+
\ contains=@Spell,zshQuoted,@zshDerefs,@zshSubstQuoted fold
5252
syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold
53+
\ contains=@Spell
5354
syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+
5455
\ skip=+\\[\\']+ end=+'+ contains=zshPOSIXQuoted,zshQuoted
5556
syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)'
@@ -68,7 +69,7 @@ syn keyword zshConditional if then elif else fi esac select
6869

6970
syn keyword zshCase case nextgroup=zshCaseWord skipwhite
7071
syn match zshCaseWord /\S\+/ nextgroup=zshCaseIn skipwhite contained transparent
71-
syn keyword zshCaseIn in nextgroup=zshCasePattern skipwhite skipnl contained
72+
syn keyword zshCaseIn in nextgroup=zshComment,zshCasePattern skipwhite skipnl contained
7273
syn match zshCasePattern /\S[^)]*)/ contained
7374

7475
syn keyword zshRepeat while until repeat
@@ -94,22 +95,24 @@ syn match zshRedir '|\@1<!|&\=|\@!'
9495

9596
syn region zshHereDoc matchgroup=zshRedir
9697
\ start='<\@<!<<\s*\z([^<]\S*\)'
97-
\ end='^\z1\>'
98-
\ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString
98+
\ end='^\z1$'
99+
\ contains=@Spell,@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString
99100
syn region zshHereDoc matchgroup=zshRedir
100101
\ start='<\@<!<<\s*\\\z(\S\+\)'
101-
\ end='^\z1\>'
102-
\ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString
102+
\ end='^\z1$'
103+
\ contains=@Spell
103104
syn region zshHereDoc matchgroup=zshRedir
104105
\ start='<\@<!<<-\s*\\\=\z(\S\+\)'
105-
\ end='^\s*\z1\>'
106-
\ contains=@zshSubst,@zshDerefs,zshQuoted,zshPOSIXString
106+
\ end='^\t*\z1$'
107+
\ contains=@Spell
107108
syn region zshHereDoc matchgroup=zshRedir
108109
\ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+
109-
\ end='^\z1\>'
110+
\ end='^\z1$'
111+
\ contains=@Spell
110112
syn region zshHereDoc matchgroup=zshRedir
111113
\ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+
112-
\ end='^\s*\z1\>'
114+
\ end='^\t*\z1$'
115+
\ contains=@Spell
113116

114117
syn match zshVariable '\<\h\w*' contained
115118

0 commit comments

Comments
 (0)