diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index 84568710a5..aed7426685 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -1,7 +1,7 @@ " Vim syntax file generator " Language: Vim script " Maintainer: Hirohito Higashi (h_east) -" Last Change: 2025 Aug 27 +" Last Change: 2025 Sep 23 let s:keepcpo= &cpo set cpo&vim @@ -412,6 +412,7 @@ function s:get_vim_command_type(cmd_name) vimgrep vimgrepadd while + wincmd EOL " Required for original behavior " \ 'global', 'vglobal' diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 8230422f1c..69ae97d3a3 100644 --- a/runtime/syntax/generator/vim.vim.base +++ b/runtime/syntax/generator/vim.vim.base @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Sep 18 +" Last Change: 2025 Sep 23 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -245,7 +245,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" skipwhite nextgroup=vimWincmdArg +" TODO: consider extracting this list from the help file +syn match vimWincmdArg contained + \ "\<[sSvnqojkhlwWtbpPrRxKJHLTfFz]\>\|[\^:=\-+_<>|\]}]\|\" + \ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment + +" only handles oneline assignments +Vim9 syn match vimWincmd "\s\=\\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg + " Syntax: {{{2 "======= syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial @@ -2559,6 +2570,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimWildcardInterval vimWildcard hi def link vimWildcardQuestion vimWildcard hi def link vimWildcardStar vimWildcard + hi def link vimWinCmd vimCommand hi def link vim9Abstract vimCommand hi def link vim9Boolean Boolean diff --git a/runtime/syntax/testdir/dumps/vim9_comments_04.dump b/runtime/syntax/testdir/dumps/vim9_comments_04.dump index 42900217c0..22353a0de5 100644 --- a/runtime/syntax/testdir/dumps/vim9_comments_04.dump +++ b/runtime/syntax/testdir/dumps/vim9_comments_04.dump @@ -4,7 +4,7 @@ @75 |i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51 @2>c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| |r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e+0#00e0e07&|d|i|t| +0#0000000&|%+0#af5f00255&@1| +0#0000000&||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000& -@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 +@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69 @75 @75 diff --git a/runtime/syntax/testdir/dumps/vim_comments_03.dump b/runtime/syntax/testdir/dumps/vim_comments_03.dump index 2ceb8d6b34..fba406f9d4 100644 --- a/runtime/syntax/testdir/dumps/vim_comments_03.dump +++ b/runtime/syntax/testdir/dumps/vim_comments_03.dump @@ -8,7 +8,7 @@ @75 |i+0#af5f00255&|f| +0#0000000&|!+0#af5f00255&|e+0#00e0e07&|x|i|s|t|s|(+0#e000e06&|"+0#e000002&|:|D|i|f@1|O|r|i|g|"|)+0#e000e06&| +0#0000000&@51 @2|c+0#af5f00255&|o|m@1|a|n|d| +0#0000000&|D|i|f@1|O|r|i|g| |v+0#af5f00255&|e|r|t| +0#0000000&|n+0#af5f00255&|e|w| +0#0000000&||| |s+0#af5f00255&|e|t| +0#0000000&|b+0#e000e06&|t|=+0#af5f00255&|n+0#0000000&|o|f|i|l|e| ||| |r+0#af5f00255&| +0#0000000&|++0#af5f00255&@1|e+0#00e0e07&|d|i|t| +0#0000000&|#| ||| |0+0#e000002&|d+0#0000000&|_| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@1 -@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#af5f00255&| +0#0000000&||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 +@18|\+0#e000e06&| +0#0000000&||| |w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p| ||| |d+0#af5f00255&|i|f@1|t|h|i|s| +0#0000000&@33 |e+0#af5f00255&|n|d|i|f| +0#0000000&@69 @75 @75 diff --git a/runtime/syntax/testdir/dumps/vim_ex_wincmd_00.dump b/runtime/syntax/testdir/dumps/vim_ex_wincmd_00.dump new file mode 100644 index 0000000000..f2e33d0d08 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_wincmd_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |:|w|i|n|c|m|d| |c|o|m@1|a|n|d| +0#0000000&@53 +|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|W|i|n|c|m|d|A|r|g| |T|o|d|o| +0#0000000&@32 +|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|C|m|d|S|e|p| |S|p|e|c|i|a|l| +0#0000000&@32 +@75 +@75 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|s+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|S+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|v+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|n+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|^+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|:+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|q+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|o+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|j+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|k+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|h+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|l+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|w+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|W+0#0000001#ffff4012| +0#0000000#ffffff0@66 +@57|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_ex_wincmd_01.dump b/runtime/syntax/testdir/dumps/vim_ex_wincmd_01.dump new file mode 100644 index 0000000000..e5daa83466 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_wincmd_01.dump @@ -0,0 +1,20 @@ +|w+0#af5f00255#ffffff0|i|n|c|m|d| +0#0000000&|j+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|k+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|h+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|l+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|w+0#0000001#ffff4012| +0#0000000#ffffff0@66 +>w+0#af5f00255&|i|n|c|m|d| +0#0000000&|W+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|t+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|b+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|p+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|P+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|r+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|R+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|x+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|K+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|J+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|H+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|L+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|T+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0@66 +@57|1|9|,|1| @9|2|7|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_wincmd_02.dump b/runtime/syntax/testdir/dumps/vim_ex_wincmd_02.dump new file mode 100644 index 0000000000..fe6b8552e1 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_wincmd_02.dump @@ -0,0 +1,20 @@ +|w+0#af5f00255#ffffff0|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|-+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|++0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|_+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|<+0#0000001#ffff4012| +0#0000000#ffffff0@66 +>w+0#af5f00255&|i|n|c|m|d| +0#0000000&|>+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&||+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|]+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012| |]| +0#0000000#ffffff0@64 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|f+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|F+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012|f| +0#0000000#ffffff0@65 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012|F| +0#0000000#ffffff0@65 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012|t| +0#0000000#ffffff0@65 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012|T| +0#0000000#ffffff0@65 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|z+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|}+0#0000001#ffff4012| +0#0000000#ffffff0@66 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|g+0#0000001#ffff4012| |}| +0#0000000#ffffff0@64 +@75 +@57|3|7|,|1| @9|6|4|%| diff --git a/runtime/syntax/testdir/dumps/vim_ex_wincmd_03.dump b/runtime/syntax/testdir/dumps/vim_ex_wincmd_03.dump new file mode 100644 index 0000000000..af7faa3e64 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_ex_wincmd_03.dump @@ -0,0 +1,20 @@ +| +0&#ffffff0@74 +@75 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&||+0#0000001#ffff4012| +0#0000000#ffffff0||+0#e000e06&| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@53 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&||+0#0000001#ffff4012| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56 +|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|s+0#0000001#ffff4012| +0#0000000#ffffff0||+0#e000e06&| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@53 +>w+0#af5f00255&|i|n|c|m|d| +0#0000000&|s+0#0000001#ffff4012| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@56 +@75 +@75 +|d+0#af5f00255&|e|f| +0#0000000&|V|i|m|9|C|o|n|t|e|x|t|(+0#e000e06&|)| +0#0000000&@57 +@2|v+0#af5f00255&|a|r| +0#0000000&|w|i|n|c|m|d| |=+0#af5f00255&| +0#0000000&|4+0#e000002&|2| +0#0000000&@57 +@2|w|i|n|c|m|d| |=+0#af5f00255&| +0#0000000&|4+0#e000002&|2| +0#0000000&@61 +@2|:+0#e000e06&|w+0#af5f00255&|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0@63 +@1| +0#af5f00255&|w|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@54 +@1| +0#af5f00255&|w|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0||+0#e000e06&| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@51 +@2|#+0#0000e05&| +0#0000000&|K+0#e000e06&|N|O|W|N|:| +0#0000e05&|i|n|c|o|r@1|e|c|t|l|y| |m|a|t|c|h|e|s| |a|s| |t|h|e| |E|x| |c|o|m@1|a|n|d| |r|a|t|h|e|r| |t|h|a|n| |a| |v|a|r|i|a|b|l|e| +0#0000000&@3 +@1| +0#af5f00255&|w|i|n|c|m|d| +0#0000000&|=+0#0000001#ffff4012| +0#0000000#ffffff0@64 +|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68 +@75 +|~+0#4040ff13&| @73 +| +0#0000000&@56|5@1|,|1| @9|B|o|t| diff --git a/runtime/syntax/testdir/input/vim_ex_wincmd.vim b/runtime/syntax/testdir/input/vim_ex_wincmd.vim new file mode 100644 index 0000000000..68fac3ae44 --- /dev/null +++ b/runtime/syntax/testdir/input/vim_ex_wincmd.vim @@ -0,0 +1,67 @@ +" Vim :wincmd command +" VIM_TEST_SETUP hi link vimWincmdArg Todo +" VIM_TEST_SETUP hi link vimCmdSep Special + + +wincmd s +wincmd S +wincmd v +wincmd n +wincmd ^ +wincmd : +wincmd q +wincmd o +wincmd j +wincmd k +wincmd h +wincmd l +wincmd w +wincmd W +wincmd t +wincmd b +wincmd p +wincmd P +wincmd r +wincmd R +wincmd x +wincmd K +wincmd J +wincmd H +wincmd L +wincmd T +wincmd = +wincmd - +wincmd + +wincmd _ +wincmd < +wincmd > +wincmd | +wincmd ] +wincmd g ] +wincmd f +wincmd F +wincmd gf +wincmd gF +wincmd gt +wincmd gT +wincmd z +wincmd } +wincmd g } + + +wincmd | | echo "Foo" +wincmd | " comment +wincmd s | echo "Foo" +wincmd s " comment + + +def Vim9Context() + var wincmd = 42 + wincmd = 42 + :wincmd = + wincmd = # comment + wincmd = | echo "Foo" + # KNOWN: incorrectly matches as the Ex command rather than a variable + wincmd = +enddef + diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 2ecb2b37af..e8f86d7d02 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi " Doug Kearns -" Last Change: 2025 Sep 18 +" Last Change: 2025 Sep 23 " Former Maintainer: Charles E. Campbell " DO NOT CHANGE DIRECTLY. @@ -37,7 +37,7 @@ syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argdo argded[ syn keyword vimCommand contained cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] delm[arks] deb[ug] defc[ompile] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] em[enu] endfo[r] endt[ry] endw[hile] ene[w] ex exi[t] exu[sage] f[ile] files fin[d] fina[lly] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] hi[ghlight] his[tory] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] nextgroup=vimBang syn keyword vimCommand contained lcl[ose] lcs[cope] ld[o] le[ft] lex[pr] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] n[ext] nb[key] nbc[lose] nbs[tart] noh[lsearch] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pb[uffer] pc[lose] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] q[uit] quita[ll] qa[ll] r[ead] rec[over] nextgroup=vimBang syn keyword vimCommand contained red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] scr[iptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] sim[alt] sig[n] sla[st] sn[ext] so[urce] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sre[wind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabd[o] tabe[dit] nextgroup=vimBang -syn keyword vimCommand contained tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] ter[minal] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] winc[md] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang +syn keyword vimCommand contained tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] te[aroff] ter[minal] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] unlo[ckvar] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] wind[o] winp[os] wl[restore] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i nextgroup=vimBang " Lower priority :syn-match to allow for :command/function() distinction syn match vimCommand "\" nextgroup=vimBang @@ -299,7 +299,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi syn case match " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutocmd,vimAugroup,vimBehave,vimCall,vimCatch,vimCommandModifier,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSynColor,vimSynLink,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "\\\@1" skipwhite nextgroup=vimWincmdArg +" TODO: consider extracting this list from the help file +syn match vimWincmdArg contained + \ "\<[sSvnqojkhlwWtbpPrRxKJHLTfFz]\>\|[\^:=\-+_<>|\]}]\|\" + \ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment + +" only handles oneline assignments +Vim9 syn match vimWincmd "\s\=\\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg + " Syntax: {{{2 "======= syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial @@ -2621,6 +2632,7 @@ if !exists("skip_vim_syntax_inits") hi def link vimWildcardInterval vimWildcard hi def link vimWildcardQuestion vimWildcard hi def link vimWildcardStar vimWildcard + hi def link vimWinCmd vimCommand hi def link vim9Abstract vimCommand hi def link vim9Boolean Boolean