mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
runtime(vim): Update base syntax, match :wincmd
Match the full :wincmd command syntax. Allow for oneline assignment to Vim9 variables named winc[md]. Fixes #18368. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
8b9e687ea1
commit
b1446dfd23
@@ -1,7 +1,7 @@
|
|||||||
" Vim syntax file generator
|
" Vim syntax file generator
|
||||||
" Language: Vim script
|
" Language: Vim script
|
||||||
" Maintainer: Hirohito Higashi (h_east)
|
" Maintainer: Hirohito Higashi (h_east)
|
||||||
" Last Change: 2025 Aug 27
|
" Last Change: 2025 Sep 23
|
||||||
|
|
||||||
let s:keepcpo= &cpo
|
let s:keepcpo= &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
@@ -412,6 +412,7 @@ function s:get_vim_command_type(cmd_name)
|
|||||||
vimgrep
|
vimgrep
|
||||||
vimgrepadd
|
vimgrepadd
|
||||||
while
|
while
|
||||||
|
wincmd
|
||||||
EOL
|
EOL
|
||||||
" Required for original behavior
|
" Required for original behavior
|
||||||
" \ 'global', 'vglobal'
|
" \ 'global', 'vglobal'
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
" Language: Vim script
|
" Language: Vim script
|
||||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||||
" Doug Kearns <dougkearns@gmail.com>
|
" Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2025 Sep 18
|
" Last Change: 2025 Sep 23
|
||||||
" Former Maintainer: Charles E. Campbell
|
" Former Maintainer: Charles E. Campbell
|
||||||
|
|
||||||
" DO NOT CHANGE DIRECTLY.
|
" DO NOT CHANGE DIRECTLY.
|
||||||
@@ -245,7 +245,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi
|
|||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
" All vimCommands are contained by vimIsCommand. {{{2
|
" 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 cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
|
||||||
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
||||||
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||||
@@ -1615,6 +1615,17 @@ syn region vimUniqPattern contained
|
|||||||
|
|
||||||
syn cluster vimUniqOptions contains=vimUniqOptions,vimUniqOptionsError
|
syn cluster vimUniqOptions contains=vimUniqOptions,vimUniqOptionsError
|
||||||
|
|
||||||
|
" Wincmd: {{{2
|
||||||
|
" ======
|
||||||
|
syn match vimWincmd "\<winc\%[md]\>" skipwhite nextgroup=vimWincmdArg
|
||||||
|
" TODO: consider extracting this list from the help file
|
||||||
|
syn match vimWincmdArg contained
|
||||||
|
\ "\<[sSvnqojkhlwWtbpPrRxKJHLTfFz]\>\|[\^:=\-+_<>|\]}]\|\<g\s\+[\]}]\|\<g[fFtT]\>"
|
||||||
|
\ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
|
||||||
|
|
||||||
|
" only handles oneline assignments
|
||||||
|
Vim9 syn match vimWincmd "\s\=\<winc\%[md]\>\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg
|
||||||
|
|
||||||
" Syntax: {{{2
|
" Syntax: {{{2
|
||||||
"=======
|
"=======
|
||||||
syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial
|
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 vimWildcardInterval vimWildcard
|
||||||
hi def link vimWildcardQuestion vimWildcard
|
hi def link vimWildcardQuestion vimWildcard
|
||||||
hi def link vimWildcardStar vimWildcard
|
hi def link vimWildcardStar vimWildcard
|
||||||
|
hi def link vimWinCmd vimCommand
|
||||||
|
|
||||||
hi def link vim9Abstract vimCommand
|
hi def link vim9Abstract vimCommand
|
||||||
hi def link vim9Boolean Boolean
|
hi def link vim9Boolean Boolean
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
@75
|
@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
|
|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&
|
@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
|
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
|
||||||
@75
|
@75
|
||||||
@75
|
@75
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
@75
|
@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
|
|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
|
@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
|
|e+0#af5f00255&|n|d|i|f| +0#0000000&@69
|
||||||
@75
|
@75
|
||||||
@75
|
@75
|
||||||
|
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_00.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_00.dump
Normal file
@@ -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|
|
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_01.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_01.dump
Normal file
@@ -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|%|
|
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_02.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_02.dump
Normal file
@@ -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|%|
|
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_03.dump
Normal file
20
runtime/syntax/testdir/dumps/vim_ex_wincmd_03.dump
Normal file
@@ -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|
|
67
runtime/syntax/testdir/input/vim_ex_wincmd.vim
Normal file
67
runtime/syntax/testdir/input/vim_ex_wincmd.vim
Normal file
@@ -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
|
||||||
|
|
@@ -2,7 +2,7 @@
|
|||||||
" Language: Vim script
|
" Language: Vim script
|
||||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||||
" Doug Kearns <dougkearns@gmail.com>
|
" Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2025 Sep 18
|
" Last Change: 2025 Sep 23
|
||||||
" Former Maintainer: Charles E. Campbell
|
" Former Maintainer: Charles E. Campbell
|
||||||
|
|
||||||
" DO NOT CHANGE DIRECTLY.
|
" 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 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 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 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
|
" Lower priority :syn-match to allow for :command/function() distinction
|
||||||
syn match vimCommand "\<chd\%[ir]\>" nextgroup=vimBang
|
syn match vimCommand "\<chd\%[ir]\>" nextgroup=vimBang
|
||||||
@@ -299,7 +299,7 @@ syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vi
|
|||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
" All vimCommands are contained by vimIsCommand. {{{2
|
" 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 cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
|
||||||
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,@vimFunc
|
||||||
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||||
@@ -1677,6 +1677,17 @@ syn region vimUniqPattern contained
|
|||||||
|
|
||||||
syn cluster vimUniqOptions contains=vimUniqOptions,vimUniqOptionsError
|
syn cluster vimUniqOptions contains=vimUniqOptions,vimUniqOptionsError
|
||||||
|
|
||||||
|
" Wincmd: {{{2
|
||||||
|
" ======
|
||||||
|
syn match vimWincmd "\<winc\%[md]\>" skipwhite nextgroup=vimWincmdArg
|
||||||
|
" TODO: consider extracting this list from the help file
|
||||||
|
syn match vimWincmdArg contained
|
||||||
|
\ "\<[sSvnqojkhlwWtbpPrRxKJHLTfFz]\>\|[\^:=\-+_<>|\]}]\|\<g\s\+[\]}]\|\<g[fFtT]\>"
|
||||||
|
\ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
|
||||||
|
|
||||||
|
" only handles oneline assignments
|
||||||
|
Vim9 syn match vimWincmd "\s\=\<winc\%[md]\>\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg
|
||||||
|
|
||||||
" Syntax: {{{2
|
" Syntax: {{{2
|
||||||
"=======
|
"=======
|
||||||
syn match vimGroupList contained "[^[:space:],]\+\%(\s*,\s*[^[:space:],]\+\)*" contains=vimGroupSpecial
|
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 vimWildcardInterval vimWildcard
|
||||||
hi def link vimWildcardQuestion vimWildcard
|
hi def link vimWildcardQuestion vimWildcard
|
||||||
hi def link vimWildcardStar vimWildcard
|
hi def link vimWildcardStar vimWildcard
|
||||||
|
hi def link vimWinCmd vimCommand
|
||||||
|
|
||||||
hi def link vim9Abstract vimCommand
|
hi def link vim9Abstract vimCommand
|
||||||
hi def link vim9Boolean Boolean
|
hi def link vim9Boolean Boolean
|
||||||
|
Reference in New Issue
Block a user