summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authordkearns <dougkearns@gmail.com>2024-03-05 05:15:42 +1100
committerGitHub <noreply@github.com>2024-03-04 19:15:42 +0100
commite5c9ba6015735b8b12e35dc5873bfc957dcbb600 (patch)
tree4e4d57faa0896939d1a125e1e363a85e85f1992a /runtime
parent1bdc9435c1a14ca1a30e5b5927ab63f603ec4409 (diff)
runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (#14137)
* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups - Remove contained :syntax and :highlight sub-groups from the function body cluster. These should only match in the respective commands. - Remove vimSynLine syntax group from several clusters. The definition of vimSynLine was removed in Vim 5.3. * runtime(vim): Update syntax generator, use standard Last Change date format The de facto standard date format is YYYY MMM DD. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/syntax/generator/gen_syntax_vim.vim2
-rw-r--r--runtime/syntax/generator/update_date.vim2
-rw-r--r--runtime/syntax/generator/vim.vim.base14
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump20
-rw-r--r--runtime/syntax/testdir/input/vim_ex_syntax.vim (renamed from runtime/syntax/testdir/input/vim_syntax.vim)13
-rw-r--r--runtime/syntax/vim.vim14
16 files changed, 243 insertions, 22 deletions
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
index 501d64c93e..596fa7b9c8 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi (h_east)
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: Mar 02, 2024
+" Last Change: 2024 Mar 02
" Version: 2.0.4
let s:keepcpo= &cpo
diff --git a/runtime/syntax/generator/update_date.vim b/runtime/syntax/generator/update_date.vim
index 54eb4edb42..35561897c3 100644
--- a/runtime/syntax/generator/update_date.vim
+++ b/runtime/syntax/generator/update_date.vim
@@ -7,7 +7,7 @@ normal gg
let pat = '^"\s*Last\s*Change:\s\+'
let lnum = search(pat, 'We', 10)
if lnum > 0
- exec 'norm! lD"=strftime("%b %d, %Y")' . "\rp"
+ exec 'norm! lD"=strftime("%Y %b %d")' . "\rp"
silent update
endif
quitall!
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index 4cb75d4ac0..f26a94a19c 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: Mar 03, 2024
+" Last Change: 2024 Mar 04
" Former Maintainer: Charles E. Campbell
" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Base File Version: 9.0-25
@@ -208,7 +208,7 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
-syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
@@ -239,7 +239,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
-syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimSynLine
+syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def\s\+new\i\{-}(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
@@ -286,7 +286,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" User-Specified Commands: {{{2
" =======================
-syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
+syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
syn match vimUserAttrbError contained "-\a\+\ze\s"
@@ -576,7 +576,6 @@ syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
-syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
" Syntax: foldlevel {{{2
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
@@ -592,21 +591,18 @@ syn match vimIskSep contained ','
" Syntax: include {{{2
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
-syn cluster vimFuncBodyList add=vimSynMtchGroup
" Syntax: off and on {{{2
syn keyword vimSynType contained enable list manual off on reset
@@ -627,7 +623,6 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
syn match vimSynNotPatRange contained "\\\\\|\\\["
syn match vimMtchComment contained '"[^"]\+$'
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: sync {{{2
" ============
@@ -700,7 +695,6 @@ syn keyword vimHiClear contained clear nextgroup=vimHiGroup
" see tst24 (hi def vs hi) (Jul 06, 2018)
"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster
-syn cluster vimFuncBodyList add=vimHiLink
" Control Characters: {{{2
" ==================
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump
new file mode 100644
index 0000000000..916f96dc4a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d| +0#0000000&@53
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&|"+0#e000002&|p|a|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"+0#0000e05&| |t|a|i|l| |c|o|m@1|e|n|t| +0#0000000&@20
+|"+0#0000e05&| +0#0000000&|N+0#e000e06&|O|T|E|:| +0#0000e05&|c|o|m@1|e|n|t|s| |n|o|t| |c|u|r@1|e|n|t|l|y| |s|u|p@1|o|r|t|e|d| +0#0000000&@34
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&|k|e|y|w|o|r|d| |c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @18
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a
+|t@1|e|r|n|"| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&|"| |t|a|i|l| |c|o|m@1|e|n|t| @43
+@75
+|"+0#0000e05&| |M|u|l|t|i|l|i|n|e| |c|o|m@1|a|n|d|s| +0#0000000&@54
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump
new file mode 100644
index 0000000000..800e4a709f
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_01.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |1| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@57|1|9|,|7| @10|8|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump
new file mode 100644
index 0000000000..54d873467c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_02.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|1| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |2| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|2| @58
+@6|"+0#0000e05&|\| |k|e|y|w|o|r|d| |3| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|3| @58
+> @74
+|s+0#af5f00255&|y|n| +0#0000000&|m+0#00e0003&|a|t|c|h| +0#0000000&|t+0#00e0003&|e|s|t|M|a|t|c|h| +0#0000000&@55
+@6|"+0#0000e05&|\| |M|A|T|C|H| |P|A|T@1|E|R|N| +0#0000000&@52
+@6|"+0#0000e05&|\| |p|a|t@1|e|r|n| |s|t|a|r|t| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|/+0#e000002&| +0#0000000&@65
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |1| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|1|a| |.|*| |p|a|t|1|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |2| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|2|a| |.|*| |p|a|t|2|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|r|t| |3| |d|e|s|c|r|i|p|t|i|o|n| +0#0000000&@47
+| +0#e000002&@5|\+0#e000e06&|p+0#e000002&|a|t|3|a| |.|*| |p|a|t|3|b| +0#0000000&@53
+| +0#e000002&@5|"+0#0000e05&|\| |p|a|t@1|e|r|n| |e|n|d| +0#0000000&@54
+| +0#e000002&@5|\+0#e000e06&|/+0#e000002&| +0#0000000&@66
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@57|3|7|,|0|-|1| @7|1|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump
new file mode 100644
index 0000000000..f0a248181c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@57|5@1|,|7| @9|3|1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump
new file mode 100644
index 0000000000..2298efb590
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_04.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6>"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|r+0#00e0003&|e|g|i|o|n| +0#0000000&|t+0#00e0003&|e|s|t|R|e|g|i|o|n| +0#0000000&@53
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |s|t|a|r|t| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&@45
+@6|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@57|7|3|,|7| @9|4|2|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump
new file mode 100644
index 0000000000..66a6b73017
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_05.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|k|i|p|=|"+0#e000002&|s|k|i|p|-|p|a|t@1|e|r|n|"| +0#0000000&@47
+@6|"+0#0000e05&|\| |e|n|d| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|e+0#00e0003&|n|d|=|"+0#e000002&|e|n|d|-|p|a|t@1|e|r|n|"| +0#0000000&@49
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l| |o|p|t|i|o|n| +0#0000000&@51
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l| +0#0000000&@59
+@6|"+0#0000e05&|\| |c@1|h|a|r| |o|p|t|i|o|n| +0#0000000&@53
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&@1|h|a|r|=|&+0#e000002&| +0#0000000&@59
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d| +0#0000000&@57
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|e|d|i|n| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|e|d|i|n|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|r| @41
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=|t+0#0000000&|e|s|t|N|e|x|t|0|,|@|t|e|s|t|C|l|u|s|t|e|r| @34
+@6|"+0#0000e05&|\| |t|r|a|n|s|p|a|r|e|n|t| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|t+0#e000e06&|r|a|n|s|p|a|r|e|n|t| +0#0000000&@55
+@6|"+0#0000e05&|\| |s|k|i|p|w|h|i|t|e| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@57|9|1|,|7| @9|5|3|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump
new file mode 100644
index 0000000000..12c1fbe296
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_06.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p|e|m|p|t|y| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|e|m|p|t|y| +0#0000000&@57
+@6|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6>\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
+@6|"+0#0000e05&|\| |o|n|e|l|i|n|e| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|o+0#e000e06&|n|e|l|i|n|e| +0#0000000&@59
+@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
+@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
+@6|"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
+@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
+@6|"+0#0000e05&|\| |c|o|n|c|e|a|l|e|n|d|s| |o|p|t|i|o|n| +0#0000000&@47
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|c|e|a|l|e|n|d|s| +0#0000000&@55
+@6|"+0#0000e05&|\| |e|x|c|l|u|d|e|n|l| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|c|l|u|d|e|n|l| +0#0000000&@57
+@6|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@57|1|0|9|,|7| @8|6|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump
new file mode 100644
index 0000000000..d7d10551b2
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_07.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |k|e@1|p|e|n|d| |o|p|t|i|o|n| +0#0000000&@51
+@6|\+0#e000e06&| +0#0000000&|k+0#e000e06&|e@1|p|e|n|d| +0#0000000&@59
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6>"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
+@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2|,|t|e|s|t|C|o|n|t|a|i|n|e|d|3| @13
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|c+0#00e0003&|l|u|s|t|e|r| +0#0000000&|t+0#00e0003&|e|s|t|C|l|u|s|t|e|r| +0#0000000&@51
+@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
+@6|"+0#0000e05&|\| |a|d@1| |o|p|t|i|o|n| +0#0000000&@55
+@6|\+0#e000e06&| +0#0000000&|a+0#e000e06&|d@1|=|t+0#0000000&|e|s|t|A|d@1| @55
+@6|"+0#0000e05&|\| |r|e|m|o|v|e| |o|p|t|i|o|n| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|r+0#e000e06&|e|m|o|v|e|=|t+0#0000000&|e|s|t|R|e|m|o|v|e| @49
+@75
+@75
+|"+0#0000e05&| |m|u|l|t|i|l|i|n|e| |g|r|o|u|p| |l|i|s|t| +0#0000000&@52
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+@57|1|2|7|,|7| @8|7|6|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump
new file mode 100644
index 0000000000..4042d33978
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_08.dump
@@ -0,0 +1,20 @@
+|s+0#af5f00255#ffffff0|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|0| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|1| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|2| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|3| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|4| +0#0000000&|k|e|y|w|o|r|d| @45
+>s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|5| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|6| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|7| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|8| +0#0000000&|k|e|y|w|o|r|d| @45
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|N|e|x|t|9| +0#0000000&|k|e|y|w|o|r|d| @45
+@75
+|s+0#af5f00255&|y|n| +0#0000000&|k+0#00e0003&|e|y|w|o|r|d| +0#0000000&|t+0#00e0003&|e|s|t|K|e|y|w|o|r|d| +0#0000000&@51
+@6|"+0#0000e05&|\| |n|e|x|t|g|r|o|u|p| |o|p|t|i|o|n| +0#0000000&@49
+@6|\+0#e000e06&| +0#0000000&|n+0#e000e06&|e|x|t|g|r|o|u|p|=| +0#0000000&@56
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|0| |,| |t|e|s|t|N|e|x|t|1| |,| @43
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|[|2|-|8|]|.|*| |,| @49
+@6|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@57|1|4|5|,|1| @8|8|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump
new file mode 100644
index 0000000000..81c3c890e6
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_09.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|"+0#0000e05&|\| |a| |c|o|m@1|e|n|t| +0#0000000&@56
+@6|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|9| |,| |@|t|e|s|t|C|l|u|s|t|e|r| |s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@32
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|4| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|5| @58
+@6>\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
+@75
+@75
+|"+0#0000e05&| |l|e|a|k|i|n|g| |c|o|n|t|a|i|n|e|d| |g|r|o|u|p|s| +0#0000000&@48
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000e05&|r|u|n|t|i|m|e|/|s|y|n|t|a|x|/|z|s|h|.|v|i|m| +0#0000000&@41
+|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!+0#0000000&| |s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@2|f+0#af5f00255&|o|r| +0#0000000&|c|l|u|s|t|e|r| |i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
+| +0#0000e05&@3|"| |.@2| +0#0000000&@65
+@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@57|1|6|3|,|7| @8|9@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump
new file mode 100644
index 0000000000..25912df5f8
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_syntax_99.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|t|e|s|t|N|e|x|t|9| |,| |@|t|e|s|t|C|l|u|s|t|e|r| |s+0#e000e06&|k|i|p|w|h|i|t|e| +0#0000000&@32
+@6|"+0#0000e05&|\| |K|E|Y|W|O|R|D|S| |L|I|S|T| +0#0000000&@52
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|4| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|5| @58
+@6|\+0#e000e06&| +0#0000000&|k|e|y|w|o|r|d|6| @58
+@75
+@75
+|"+0#0000e05&| |l|e|a|k|i|n|g| |c|o|n|t|a|i|n|e|d| |g|r|o|u|p|s| +0#0000000&@48
+@75
+|"+0#0000e05&| +0#0000000&|E+0#e000e06&|x|a|m|p|l|e|:| +0#0000e05&|r|u|n|t|i|m|e|/|s|y|n|t|a|x|/|z|s|h|.|v|i|m| +0#0000000&@41
+|"+0#0000e05&| @2|"+0#e000002&|c|l|u|s|t|e|r|"| +0#0000e05&|s|h|o|u|l|d| |n|o|t| |b|e| |h|i|g|h|l|i|g|h|t|e|d| |o|u|t|s|i|d|e| |o|f| |:|s|y|n|t|a|x| |c|o|m@1|a|n|d|s| +0#0000000&@7
+@75
+|f+0#af5f00255&|u|n|c|t|i|o|n|!+0#0000000&| |s+0#e000e06&|:|C+0#0000000&|o|n|t|a|i|n|e|d|G|r|o|u|p|(+0#e000e06&|)| +0#0000000&@46
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+@2|f+0#af5f00255&|o|r| +0#0000000&|c|l|u|s|t|e|r| |i+0#af5f00255&|n| +0#0000000&|[|'+0#e000002&|m|a|r|k|d|o|w|n|H|i|g|h|l|i|g|h|t|_|z|s|h|'|,+0#0000000&| |'+0#e000002&|z|s|h|'|]+0#0000000&| @25
+| +0#0000e05&@3|"| |.@2| +0#0000000&@65
+@2|e+0#af5f00255&|n|d|f|o|r| +0#0000000&@66
+| +0#0000e05&@1|"| |.@2| +0#0000000&@67
+>e+0#af5f00255&|n|d|f|u|n|c|t|i|o|n| +0#0000000&@63
+@57|1|7@1|,|1| @8|B|o|t|
diff --git a/runtime/syntax/testdir/input/vim_syntax.vim b/runtime/syntax/testdir/input/vim_ex_syntax.vim
index 197d4ac9d9..79437ffff5 100644
--- a/runtime/syntax/testdir/input/vim_syntax.vim
+++ b/runtime/syntax/testdir/input/vim_ex_syntax.vim
@@ -162,3 +162,16 @@ syn keyword testKeyword
\ keyword5
\ keyword6
+
+" leaking contained groups
+
+" Example: runtime/syntax/zsh.vim
+" "cluster" should not be highlighted outside of :syntax commands
+
+function! s:ContainedGroup()
+ " ...
+ for cluster in ['markdownHighlight_zsh', 'zsh']
+ " ...
+ endfor
+ " ...
+endfunction
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index c5db912e7a..cc062f47f0 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: Mar 04, 2024
+" Last Change: 2024 Mar 04
" Former Maintainer: Charles E. Campbell
" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Base File Version: 9.0-25
@@ -246,7 +246,7 @@ syn keyword vimFTOption contained detect indent off on plugin
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
-syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
+syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
@@ -277,7 +277,7 @@ endif
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
" =========
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
-syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimSynLine
+syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def\s\+new\i\{-}(" contains=@vimFuncList nextgroup=vimFuncBody
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
@@ -324,7 +324,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
" User-Specified Commands: {{{2
" =======================
-syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
+syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
syn keyword vimUserCommand contained com[mand]
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
syn match vimUserAttrbError contained "-\a\+\ze\s"
@@ -621,7 +621,6 @@ syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
-syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
" Syntax: foldlevel {{{2
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
@@ -637,21 +636,18 @@ syn match vimIskSep contained ','
" Syntax: include {{{2
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: keyword {{{2
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: match {{{2
syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
-syn cluster vimFuncBodyList add=vimSynMtchGroup
" Syntax: off and on {{{2
syn keyword vimSynType contained enable list manual off on reset
@@ -672,7 +668,6 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
syn match vimSynNotPatRange contained "\\\\\|\\\["
syn match vimMtchComment contained '"[^"]\+$'
-syn cluster vimFuncBodyList add=vimSynType
" Syntax: sync {{{2
" ============
@@ -745,7 +740,6 @@ syn keyword vimHiClear contained clear nextgroup=vimHiGroup
" see tst24 (hi def vs hi) (Jul 06, 2018)
"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster
-syn cluster vimFuncBodyList add=vimHiLink
" Control Characters: {{{2
" ==================