diff options
author | dkearns <dougkearns@gmail.com> | 2024-03-04 02:42:47 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-03 16:42:47 +0100 |
commit | c4aef9a97b3673a12de7a131d239e7f49d11f630 (patch) | |
tree | 06c439ef4a31e257585867dc222377e96277eeb8 /runtime | |
parent | d9ebd46bd090c598adc82e683b4462909f2d4ea5 (diff) |
runtime(vim): Update base-syntax, improve :augroup highlighting (#14125)
- Explicitly match the bang and group name in :aug! {name}.
- Allow any characters in a group name.
- Match default group switch marker, END.
- Match :aug without arguments (list command).
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.vim | 6 | ||||
-rw-r--r-- | runtime/syntax/generator/vim.vim.base | 26 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_ex_augroup.vim | 19 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 26 |
6 files changed, 94 insertions, 23 deletions
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index bbcdb06074..501d64c93e 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -2,8 +2,8 @@ " Language: Vim script " Maintainer: Hirohito Higashi (h_east) " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: Feb 27, 2024 -" Version: 2.0.3 +" Last Change: Mar 02, 2024 +" Version: 2.0.4 let s:keepcpo= &cpo set cpo&vim @@ -278,7 +278,7 @@ function! s:get_vim_command_type(cmd_name) \ 'map', 'mapclear', \ 'substitute', 'smagic', 'snomagic', \ 'setlocal', 'setglobal', 'set', 'var', - \ 'autocmd', 'doautocmd', 'doautoall', + \ 'autocmd', 'augroup', 'doautocmd', 'doautoall', \ 'echohl', \ 'execute', \ 'behave', 'augroup', 'normal', 'syntax', diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index f74406e499..9e959b8acb 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: Feb 27, 2024 +" Last Change: Mar 02, 2024 " Former Maintainer: Charles E. Campbell " Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Base File Version: 9.0-25 @@ -166,7 +166,8 @@ syn match vimNumber '0[0-7]\+' skipwhite nextgroup=vimGlobal,vimSubst1,v syn match vimNumber '0[bB][01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment " All vimCommands are contained by vimIsCommand. {{{2 -syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFilter,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNorm,vimSet,vimSubst1,vimSyntax,vimUnlet,vimUnmap,vimUserCmd +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd +syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" @@ -207,17 +208,21 @@ 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=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vim9Comment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimOption +syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,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 matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList + 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 else - syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList + syn region vimAugroup 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 endif -syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") - syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" + syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" endif -syn keyword vimAugroupKey contained aug[roup] + +syn match vimAutoCmdGroup contained "\S\+" +syn match vimAugroupEnd contained "\c\<END\>" +syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoCmdGroup +syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup,vimAugroupEnd " Operators: {{{2 " ========= @@ -234,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=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand +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 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 @@ -281,7 +286,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained " User-Specified Commands: {{{2 " ======================= -syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine +syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFunctionError,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine syn keyword vimUserCommand contained com[mand] syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter syn match vimUserAttrbError contained "-\a\+\ze\s" @@ -930,6 +935,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimAbb vimCommand hi def link vimAddress vimMark + hi def link vimAugroupBang vimBang hi def link vimAugroupError vimError hi def link vimAugroupKey vimCommand hi def link vimAuHighlight vimHighlight diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump b/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump new file mode 100644 index 0000000000..0424482bb0 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|a|u|g|r|o|u|p| |c|o|m@1|a|n|d| +0#0000000&@52 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| @63 +@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @38 +|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|f|o@1| @62 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @54 +@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @29 +|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @53 +@75 +|"+0#0000e05&| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@61 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&@67 +@75 +@57|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump b/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump new file mode 100644 index 0000000000..1e07f5b8f0 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_99.dump @@ -0,0 +1,20 @@ +|"+0#0000e05#ffffff0| |V|i|m| |:|a|u|g|r|o|u|p| |c|o|m@1|a|n|d| +0#0000000&@52 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| @63 +@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|f|o@1| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @38 +|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|f|o@1| @62 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @54 +@2|a+0#af5f00255&|u|t|o|c|m|d| +0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*| |e+0#af5f00255&|c|h|o|m|s|g| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@41 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @63 +@75 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| ||| |a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&|E|N|D| @29 +|a+0#af5f00255&|u|g|r|o|u|p|!| +0#0000000&|!|@|#|$|%|^|&|*|(|)|_|+| @53 +@75 +|"+0#0000e05&| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@61 +|a+0#af5f00255&|u|g|r|o|u|p| +0#0000000&@67 +> @74 +@57|1|9|,|0|-|1| @7|A|l@1| diff --git a/runtime/syntax/testdir/input/vim_ex_augroup.vim b/runtime/syntax/testdir/input/vim_ex_augroup.vim new file mode 100644 index 0000000000..2dae59dda5 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_augroup.vim @@ -0,0 +1,19 @@ +" Vim :augroup command + +augroup foo + autocmd BufRead * echomsg "Foo" +augroup END + +augroup foo | autocmd! | augroup END +augroup! foo + +augroup !@#$%^&*()_+ + autocmd BufRead * echomsg "Foo" +augroup END + +augroup !@#$%^&*()_+ | autocmd! | augroup END +augroup! !@#$%^&*()_+ + +" list groups +augroup + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 0532a48e84..0d30a2d9bd 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: Feb 27, 2024 +" Last Change: Mar 02, 2024 " Former Maintainer: Charles E. Campbell " Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Base File Version: 9.0-25 @@ -204,7 +204,8 @@ syn match vimNumber '0[0-7]\+' skipwhite nextgroup=vimGlobal,vimSubst1,v syn match vimNumber '0[bB][01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment " All vimCommands are contained by vimIsCommand. {{{2 -syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFilter,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNorm,vimSet,vimSubst1,vimSyntax,vimUnlet,vimUnmap,vimUserCmd +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd +syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" @@ -245,17 +246,21 @@ 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=vimAugroup,vimIsCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimNotFunc,vimMap,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vim9Comment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue,vimOption +syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,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 matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList + 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 else - syn region vimAugroup matchgroup=vimAugroupKey start="\<aug\%[roup]\>\ze\s\+\K\k*" end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList + syn region vimAugroup 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 endif -syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") - syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" + syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" endif -syn keyword vimAugroupKey contained aug[roup] + +syn match vimAutoCmdGroup contained "\S\+" +syn match vimAugroupEnd contained "\c\<END\>" +syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAutoCmdGroup +syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup,vimAugroupEnd " Operators: {{{2 " ========= @@ -272,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=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand +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 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 @@ -319,7 +324,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained " User-Specified Commands: {{{2 " ======================= -syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine +syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFunctionError,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine syn keyword vimUserCommand contained com[mand] syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter syn match vimUserAttrbError contained "-\a\+\ze\s" @@ -975,6 +980,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimAbb vimCommand hi def link vimAddress vimMark + hi def link vimAugroupBang vimBang hi def link vimAugroupError vimError hi def link vimAugroupKey vimCommand hi def link vimAuHighlight vimHighlight |