]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(vim): Update base syntax, match full :history command
authorDoug Kearns <dougkearns@gmail.com>
Fri, 21 Nov 2025 18:18:51 +0000 (18:18 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 21 Nov 2025 18:18:51 +0000 (18:18 +0000)
closes: #18784

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/generator/gen_syntax_vim.vim
runtime/syntax/generator/vim.vim.base
runtime/syntax/testdir/dumps/vim_ex_history_00.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_history_01.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_history_02.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_history_03.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_history_04.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_ex_history_05.dump [new file with mode: 0644]
runtime/syntax/testdir/input/vim_ex_history.vim [new file with mode: 0644]
runtime/syntax/vim.vim

index 0e93f3c7b4374512c254cc1b6a9eeebf6abe7658..59e3354ee0195705bfde56a9b0f0bcf39613a88e 100644 (file)
@@ -1,7 +1,7 @@
 " Vim syntax file generator
 " Language:             Vim script
 " Maintainer:  Hirohito Higashi (h_east)
-" Last Change: 2025 Nov 17
+" Last Change: 2025 Nov 21
 
 let s:keepcpo= &cpo
 set cpo&vim
@@ -360,6 +360,7 @@ function s:get_vim_command_type(cmd_name)
                grepadd
                helpgrep
                highlight
+               history
                if
                import
                interface
index 93fcde62a6646db15335c9b206fdf42dce90aca1..007c87dca84397b0d3aafe51f3a91a7b04f6cd37 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Nov 17
+" Last Change:    2025 Nov 21
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -246,7 +246,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,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@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,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,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=@vimCmdList,vimSubst1,@vimFunc
 syn match vimCmdSep    ":\+"   skipwhite nextgroup=@vimCmdList,vimSubst1
@@ -389,6 +389,16 @@ endif
 syn keyword vimFTCmd    contained      filet[ype]
 syn keyword vimFTOption contained      detect indent off on plugin
 
+" History {{{2
+" =======
+" TODO: handle Vim9 "history" variable assignment (like :wincmd, but a common variable name)
+syn keyword    vimHistory      his[tory]       skipwhite nextgroup=vimHistoryName,vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn keyword    vimHistoryName  contained       c[md] s[earch] e[xpr] i[nput] d[ebug] a[ll]     skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryName  contained       "[:/?=@>]"                      skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       "-\=\<\d\+\>\%(\s*,\)\="                skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       ",\s*-\=\d\+\>"                 skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       "-\=\<\d\+\s*,\s*-\=\d\+\>"             skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+
 " Import {{{2
 " ======
 syn keyword    vimImportAutoload       contained       autoload        skipwhite nextgroup=vimImportFilename
@@ -2513,6 +2523,8 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimHiStartStop    vimHiTerm
  hi def link vimHiTerm Type
  hi def link vimHLGroup        vimGroup
+ hi def link vimHistory        vimCommand
+ hi def link vimHistoryName    Special
  hi def link vimImport vimCommand
  hi def link vimImportAutoload Special
  hi def link vimImportAs       vimImport
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_00.dump b/runtime/syntax/testdir/dumps/vim_ex_history_00.dump
new file mode 100644 (file)
index 0000000..7a1eb3e
--- /dev/null
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|h|i|s|t|o|r|y| |c|o|m@1|a|n|d| +0#0000000&@52
+|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|H|i|s|t|o|r|y|R|a|n|g|e| |T|o|d|o| +0#0000000&@29
+@75
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@8|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|c+0#e000e06&|m|d| +0#0000000&@4|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|:+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|s+0#e000e06&|e|a|r|c|h| +0#0000000&@1|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|/+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|?+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|e+0#e000e06&|x|p|r| +0#0000000&@3|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|=+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|i+0#e000e06&|n|p|u|t| +0#0000000&@2|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|@+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|d+0#e000e06&|e|b|u|g| +0#0000000&@2|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|>+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+@75
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012| +0#0000000#ffffff0@64
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1| +0#0000000#ffffff0@64
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_01.dump b/runtime/syntax/testdir/dumps/vim_ex_history_01.dump
new file mode 100644 (file)
index 0000000..71c8a8c
--- /dev/null
@@ -0,0 +1,20 @@
+|h+0#af5f00255#ffffff0|i|s|t|o|r|y| +0#0000000&|d+0#e000e06&|e|b|u|g| +0#0000000&@2|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|>+0#e000e06&| +0#0000000&@6|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@55
+@75
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012| +0#0000000#ffffff0@64
+>h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1| +0#0000000#ffffff0@64
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,| +0#0000000#ffffff0@63
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,| +0#0000000#ffffff0@63
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@2|,+0#0000001#ffff4012| |1| +0#0000000#ffffff0@61
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@2|,+0#0000001#ffff4012|-|1| +0#0000000#ffffff0@61
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,| |1| +0#0000000#ffffff0@61
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,|-|1| +0#0000000#ffffff0@61
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,| |1| +0#0000000#ffffff0@61
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,|-|1| +0#0000000#ffffff0@61
+@75
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,| |1| +0#0000000#ffffff0@62
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012| |,|1| +0#0000000#ffffff0@62
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012| |,| |1| +0#0000000#ffffff0@61
+@75
+@57|1|9|,|1| @9|1|8|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_02.dump b/runtime/syntax/testdir/dumps/vim_ex_history_02.dump
new file mode 100644 (file)
index 0000000..56d12fe
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+@75
+|"+0#0000e05&| |t|a|i|l| |c|o|m@1|e|n|t|s| |a|n|d| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@42
+@75
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@8||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@46
+>h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@8|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@46
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@4||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@46
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@4|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@46
+|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@49
+@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|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@14|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|c+0#e000e06&|m|d| +0#0000000&@10|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|:+0#e000e06&| +0#0000000&@12|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|s+0#e000e06&|e|a|r|c|h| +0#0000000&@7|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@57|3|7|,|1| @9|4@1|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_03.dump b/runtime/syntax/testdir/dumps/vim_ex_history_03.dump
new file mode 100644 (file)
index 0000000..828d95a
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|s+0#e000e06&|e|a|r|c|h| +0#0000000&@7|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|/+0#e000e06&| +0#0000000&@12|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|?+0#e000e06&| +0#0000000&@12|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|e+0#e000e06&|x|p|r| +0#0000000&@9|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|#+0#0000e05&| |F+0#0000001#ffff4012|I|X|M|E| +0#0000000#ffffff0@65
+@2>#+0#0000e05&| |h|i|s|t|o|r|y| |=| @10|1|,|9| +0#0000000&@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|i+0#e000e06&|n|p|u|t| +0#0000000&@8|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|@+0#e000e06&| +0#0000000&@12|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|d+0#e000e06&|e|b|u|g| +0#0000000&@8|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|>+0#e000e06&| +0#0000000&@12|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@10|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@47
+@75
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012| +0#0000000#ffffff0@62
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1| +0#0000000#ffffff0@62
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,| +0#0000000#ffffff0@61
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,| +0#0000000#ffffff0@61
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@2|,+0#0000001#ffff4012| |1| +0#0000000#ffffff0@59
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@2|,+0#0000001#ffff4012|-|1| +0#0000000#ffffff0@59
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,| |1| +0#0000000#ffffff0@59
+@57|5@1|,|3| @9|7|0|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_04.dump b/runtime/syntax/testdir/dumps/vim_ex_history_04.dump
new file mode 100644 (file)
index 0000000..07fab77
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,| |1| +0#0000000#ffffff0@59
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@1|1+0#0000001#ffff4012|,|-|1| +0#0000000#ffffff0@59
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,| |1| +0#0000000#ffffff0@59
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|-+0#0000001#ffff4012|1|,|-|1| +0#0000000#ffffff0@59
+@75
+@2>h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,| |1| +0#0000000#ffffff0@60
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012| |,|1| +0#0000000#ffffff0@60
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012| |,| |1| +0#0000000#ffffff0@59
+@75
+@75
+@2|#+0#0000e05&| |t|a|i|l| |c|o|m@1|e|n|t|s| |a|n|d| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@40
+@75
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@8||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@44
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&@8|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@44
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&@4|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@4||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@44
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0@4|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@44
+@57|7|3|,|3| @9|9|5|%| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_history_05.dump b/runtime/syntax/testdir/dumps/vim_ex_history_05.dump
new file mode 100644 (file)
index 0000000..57b9480
--- /dev/null
@@ -0,0 +1,20 @@
+| +0&#ffffff0@1|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@44
+@2|h+0#af5f00255&|i|s|t|o|r|y| +0#0000000&|a+0#e000e06&|l@1| +0#0000000&|1+0#0000001#ffff4012|,|9| +0#0000000#ffffff0|#+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@47
+|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
+> @74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|8|9|,|0|-|1| @7|B|o|t| 
diff --git a/runtime/syntax/testdir/input/vim_ex_history.vim b/runtime/syntax/testdir/input/vim_ex_history.vim
new file mode 100644 (file)
index 0000000..42dbcab
--- /dev/null
@@ -0,0 +1,89 @@
+" Vim :history command
+" VIM_TEST_SETUP hi link vimHistoryRange Todo
+
+history                1,9
+history cmd    1,9
+history :      1,9
+history search 1,9
+history /      1,9
+history ?      1,9
+history expr   1,9
+history =      1,9
+history input  1,9
+history @      1,9
+history debug  1,9
+history >      1,9
+history all    1,9
+
+history  1
+history -1
+history  1,
+history -1,
+history   , 1
+history   ,-1
+history  1, 1
+history  1,-1
+history -1, 1
+history -1,-1
+
+history 1, 1
+history 1 ,1
+history 1 , 1
+
+
+" tail comments and trailing bar
+
+history         | echo "..."
+history         " comment
+history all     | echo "..."
+history all     " comment
+history 1,9     | echo "..."
+history 1,9     " comment
+history all 1,9 | echo "..."
+history all 1,9 " comment
+
+
+def Vim9Context()
+  history              1,9
+  history cmd          1,9
+  history :            1,9
+  history search       1,9
+  history /            1,9
+  history ?            1,9
+  history expr         1,9
+  # FIXME
+  # history =          1,9
+  history input                1,9
+  history @            1,9
+  history debug                1,9
+  history >            1,9
+  history all          1,9
+
+  history  1
+  history -1
+  history  1,
+  history -1,
+  history   , 1
+  history   ,-1
+  history  1, 1
+  history  1,-1
+  history -1, 1
+  history -1,-1
+
+  history 1, 1
+  history 1 ,1
+  history 1 , 1
+
+
+  # tail comments and trailing bar
+
+  history         | echo "..."
+  history         # comment
+  history all     | echo "..."
+  history all     # comment
+  history 1,9     | echo "..."
+  history 1,9     # comment
+  history all 1,9 | echo "..."
+  history all 1,9 # comment
+enddef
+
index 973175b337e26ce419d8a98ec58d378b3a9c5bc4..f96c47078d8935ba2b6ebfd566df08835d93f145 100644 (file)
@@ -2,7 +2,7 @@
 " Language:       Vim script
 " Maintainer:     Hirohito Higashi <h.east.727 ATMARK gmail.com>
 "         Doug Kearns <dougkearns@gmail.com>
-" Last Change:    2025 Nov 17
+" Last Change:    2025 Nov 21
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -35,10 +35,10 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
 " regular vim commands {{{2
 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang'
 syn keyword vimCommand contained al[l] ar[gs] arga[dd] argd[elete] argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bf[irst] bl[ast] bm[odified] bn[ext] bp[revious] br[ewind] brea[k] buffers bun[load] bw[ipeout] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] ce[nter] cex[pr] cf[ile] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] changes che[ckpath] checkt[ime] chi[story] cl[ist] clip[reset] cla[st] clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] col[der] colo[rscheme] comc[lear] comp[iler] con[tinue] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] delm[arks] defc[ompile] di[splay] dif[fupdate] diffg[et] diffo[ff] nextgroup=vimBang
-syn keyword vimCommand contained 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] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] 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] lcl[ose] lcs[cope] le[ft] lex[pr] lf[ile] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] nextgroup=vimBang
-syn keyword vimCommand contained lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks 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] 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] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] 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] nextgroup=vimBang
-syn keyword vimCommand contained 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] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] nextgroup=vimBang
-syn keyword vimCommand contained vs[plit] w[rite] wN[ext] wa[ll] wi[nsize] 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 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] foldo[pen] g[lobal] go[to] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpt[ags] ha[rdcopy] 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] lcl[ose] lcs[cope] le[ft] lex[pr] lf[ile] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] lockv[ar] lol[der] nextgroup=vimBang
+syn keyword vimCommand contained lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lw[indow] ls m[ove] marks 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] 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] red[o] redr[aw] redraws[tatus] redrawt[abline] redrawtabp[anel] reg[isters] res[ize] ret[ab] rew[ind] ri[ght] ru[ntime] 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] nextgroup=vimBang
+syn keyword vimCommand contained 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] sync[bind] smi[le] t tN[ext] ta[g] tags tabc[lose] tabe[dit] tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs te[aroff] tf[irst] tj[ump] tl[ast] tn[ext] tp[revious] tr[ewind] try ts[elect] u[ndo] undoj[oin] undol[ist] unh[ide] up[date] v[global] ve[rsion] vi[sual] vie[w] viu[sage] vne[w] vs[plit] w[rite] nextgroup=vimBang
+syn keyword vimCommand contained wN[ext] wa[ll] wi[nsize] 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
 " :chdir is handled specially elsewhere
@@ -300,7 +300,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,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@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,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,vimWincmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList,vimLua,vimMzScheme,vimPerl,vimPython,vimPython3,vimPythonX,vimRuby,vimTcl
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAt,vimAutocmd,vimAugroup,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimCall,vimCatch,vimCd,vimCommandModifier,vimConst,vimDoautocmd,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelFunction,vimDoCommand,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimEval,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGrep,vimGrepAdd,vimGlobal,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLet,vimLoadkeymap,vimLockvar,vimMake,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimProfdel,vimProfile,vimPrompt,vimRedir,vimSet,vimSleep,vimSort,vimSyntax,vimSyntime,vimSynColor,vimSynLink,vimTerminal,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=@vimCmdList,vimSubst1,@vimFunc
 syn match vimCmdSep    ":\+"   skipwhite nextgroup=@vimCmdList,vimSubst1
@@ -444,6 +444,16 @@ endif
 syn keyword vimFTCmd    contained      filet[ype]
 syn keyword vimFTOption contained      detect indent off on plugin
 
+" History {{{2
+" =======
+" TODO: handle Vim9 "history" variable assignment (like :wincmd, but a common variable name)
+syn keyword    vimHistory      his[tory]       skipwhite nextgroup=vimHistoryName,vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn keyword    vimHistoryName  contained       c[md] s[earch] e[xpr] i[nput] d[ebug] a[ll]     skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryName  contained       "[:/?=@>]"                      skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       "-\=\<\d\+\>\%(\s*,\)\="                skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       ",\s*-\=\d\+\>"                 skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+syn match      vimHistoryRange contained       "-\=\<\d\+\s*,\s*-\=\d\+\>"             skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment
+
 " Import {{{2
 " ======
 syn keyword    vimImportAutoload       contained       autoload        skipwhite nextgroup=vimImportFilename
@@ -2576,6 +2586,8 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimHiStartStop    vimHiTerm
  hi def link vimHiTerm Type
  hi def link vimHLGroup        vimGroup
+ hi def link vimHistory        vimCommand
+ hi def link vimHistoryName    Special
  hi def link vimImport vimCommand
  hi def link vimImportAutoload Special
  hi def link vimImportAs       vimImport