runtime(vim): Update base syntax, match full :help command
Commit:
https://github.com/vim/vim/commit/927ad166a4a24f11db2d065b5f4db8f24b754696
Author: Doug Kearns <
dougk...@gmail.com>
Date: Tue Dec 9 13:40:59 2025 +0100
runtime(vim): Update base syntax, match full :help command
closes:
https://github.com/vim/vim/issues/18833
Signed-off-by: Doug Kearns <
dougk...@gmail.com>
Signed-off-by: Christian Brabandt <
c...@256bit.org>
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
index 1125cbc13..3e7fe1bc2 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 Nov 29
+" Last Change: 2025 Dec 04
let s:keepcpo= &cpo
set cpo&vim
@@ -361,6 +361,7 @@ function s:get_vim_command_type(cmd_name)
function
grep
grepadd
+ help
helpgrep
highlight
history
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index 9f0c0bcc3..754ddb053 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 <h.east.727 ATMARK
gmail.com>
" Doug Kearns <
dougk...@gmail.com>
-" Last Change: 2025 Nov 29
+" Last Change: 2025 Dec 04
" 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,vimHistory,vimImport,vimLanguage,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,vimHelp,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLanguage,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
@@ -1455,11 +1455,23 @@ syn region vimMakeArgs contained
syn match vimMakeBarEscape contained "\|"
syn match vimMakeBang contained " \@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep
+" Help*: {{{2
+" =====
+syn match vimHelp "\<h\%[elp]\>" skipwhite nextgroup=vimHelpBang,vimHelpArg,vimHelpNextCommand
+" TODO: match wildcards, ignoring exceptions?
+syn region vimHelpArg contained
+ \ start="\S"
+ \ matchgroup=Special
+ \ end="\%(@ \)\=\ze\s*\%($\|\%x0d\|\%x00\||\s*\S\)"
+ \ oneline
+syn match vimHelpBang contained " \@1<=!" skipwhite nextgroup=vimHelpArg,vimHelpNextCommand
+syn match vimHelpNextCommand contained "\ze|\s*\S" skipwhite nextgroup=vimCmdSep
+
syn match vimHelpgrep "\<l\=helpg\%[rep]\>" skipwhite nextgroup=vimHelpgrepBang,vimHelpgrepPattern
syn region vimHelpgrepPattern contained
\ start="\S"
\ matchgroup=Special
- \ end="@\w\w\>"
+ \ end="@ \>"
\ end="$"
\ contains=@vimSubstList
\ oneline
@@ -2513,6 +2525,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vimGroupRem vimSynOption
hi def link vimGroupSpecial Special
hi def link vimGroup Type
+ hi def link vimHelp vimCommand
+ hi def link vimHelpBang vimBang
hi def link vimHelpgrep vimCommand
hi def link vimHiAttrib PreProc
hi def link vimHiBang vimBang
diff --git a/runtime/syntax/testdir/dumps/vim_ex_help_00.dump b/runtime/syntax/testdir/dumps/vim_ex_help_00.dump
new file mode 100644
index 000000000..24f30e687
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_help_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|h|e|l|p| |c|o|m@1|a|n|d| +0#0000000&@55
+|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|H|e|l|p|A|r|g| |T|o|d|o| +0#0000000&@34
+@75
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&@70
+|h+0#af5f00255&|e|l|p|!| +0#0000000&||| |"+0#0000e05&| |E|4|7|8|:| |D|o|n|'|t| |p|a|n|i|c|!| +0#0000000&@46
+|h+0#af5f00255&|e|l|p| +0#0000000&@1|h+0#0000001#ffff4012|e|l|p|h|e|l|p| +0#0000000#ffffff0@60
+|h+0#af5f00255&|e|l|p|!| +0#0000000&|h+0#0000001#ffff4012|e|l|p|h|e|l|p| +0#0000000#ffffff0@60
+@75
+@75
+|"+0#0000e05&| |w|h|i|t|e|s|p|a|c|e| |a|l@1|o|w|e|d| +0#0000000&@54
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&@1|f+0#0000001#ffff4012|o@1| |b|a|r| +0#0000000#ffffff0||| |"+0#0000e05&| |E|1|4|9|:| |S|o|r@1|y|,| |n|o| |h|e|l|p| |f|o|r| |f|o@1| |b|a|r| +0#0000000&@24
+|h+0#af5f00255&|e|l|p|!| +0#0000000&|f+0#0000001#ffff4012|o@1| |b|a|r| +0#0000000#ffffff0||| |"+0#0000e05&| |E|1|4|9|:| |S|o|r@1|y|,| |n|o| |h|e|l|p| |f|o|r| |f|o@1| |b|a|r| +0#0000000&@24
+@75
+|"+0#0000e05&| |a|n|y| |c|h|a|r|a|c|t|e|r|s| +0#0000000&@58
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|!+0#0000001#ffff4012|@|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@57
+|h+0#af5f00255&|e|l|p|!|@+0#0000001#ffff4012|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@58
+@57|1|,|1| @10|T|o|p|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_help_01.dump b/runtime/syntax/testdir/dumps/vim_ex_help_01.dump
new file mode 100644
index 000000000..206d8a5af
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_help_01.dump
@@ -0,0 +1,20 @@
+|h+0#af5f00255#ffffff0|e|l|p|!| +0#0000000&|f+0#0000001#ffff4012|o@1| |b|a|r| +0#0000000#ffffff0||| |"+0#0000e05&| |E|1|4|9|:| |S|o|r@1|y|,| |n|o| |h|e|l|p| |f|o|r| |f|o@1| |b|a|r| +0#0000000&@24
+@75
+|"+0#0000e05&| |a|n|y| |c|h|a|r|a|c|t|e|r|s| +0#0000000&@58
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|!+0#0000001#ffff4012|@|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@57
+>h+0#af5f00255&|e|l|p|!|@+0#0000001#ffff4012|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@58
+|h+0#af5f00255&|e|l|p| +0#0000000&|@+0#0000001#ffff4012|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@58
+|h+0#af5f00255&|e|l|p|@+0#0000001#ffff4012|#|$|%|^|&|*|(|)|_|+| +0#0000000#ffffff0@59
+@75
+@75
+|"+0#0000e05&| |c|o|m@1|a|n|d| |s|e|p|a|r|a|t|o|r|s| +0#0000000&@54
+@75
+|h+0#af5f00255&|e|l|p||+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@59
+|h+0#af5f00255&|e|l|p||+0#0000000&| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58
+|h+0#af5f00255&|e|l|p| +0#0000000&|||e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@58
+|h+0#af5f00255&|e|l|p| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@57
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0| @1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|^+0#0000e05#ffffff0|@| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53
+@57|1|9|,|1| @9|3|7|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_help_02.dump b/runtime/syntax/testdir/dumps/vim_ex_help_02.dump
new file mode 100644
index 000000000..f4a0374a4
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_help_02.dump
@@ -0,0 +1,20 @@
+|h+0#af5f00255#ffffff0|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|^+0#0000e05#ffffff0|@| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|^+0#0000e05#ffffff0|M| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@53
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1| +0#0000000#ffffff0||| @1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@52
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1| +0#0000000#ffffff0|^+0#0000e05&|@| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@52
+>h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1| +0#0000000#ffffff0|^+0#0000e05&|M| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@52
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@55
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|^+0#0000e05#ffffff0|@|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@54
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|^+0#0000e05#ffffff0|M|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@54
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n||+0#0000000&| @1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@50
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n|^+0#0000e05&|@| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@50
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n|^+0#0000e05&|M| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@50
+@75
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n| +0#0000000&||| @1|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@49
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n| +0#0000000&|^+0#0000e05&|@| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@49
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n| +0#0000000&|^+0#0000e05&|M| +0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@49
+@75
+@57|3|7|,|1| @9|8@1|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_help_03.dump b/runtime/syntax/testdir/dumps/vim_ex_help_03.dump
new file mode 100644
index 000000000..4a9e7a90c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_help_03.dump
@@ -0,0 +1,20 @@
+| +0&#ffffff0@74
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n||+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@52
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n|^+0#0000e05&|@|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@51
+|h+0#af5f00255&|e|l|p| +0#0000000&|f+0#0000001#ffff4012|o@1|@+0#e000e06#ffffff0|e|n|^+0#0000e05&|M|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@51
+> @74
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|5|4|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_helpgrep_00.dump b/runtime/syntax/testdir/dumps/vim_ex_helpgrep_00.dump
index da8e2ed83..1e4b38343 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_helpgrep_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_helpgrep_00.dump
@@ -1,20 +1,20 @@
>"+0#0000e05#ffffff0| |V|i|m| |:|h|e|l|p|g|r|e|p| |c|o|m@1|a|n|d| +0#0000000&@51
+|"+0#0000e05&| |V|I|M|_|T|E|S|T|_|S|E|T|U|P| |h|i| |l|i|n|k| |v|i|m|H|e|l|p|g|r|e|p|P|a|t@1|e|r|n| |T|o|d|o| +0#0000000&@26
@75
@75
-|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:|h|e|l|p| @60
-|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:|h|e|l|p|@+0#e000e06&|e|n| +0#0000000&@57
-|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:|h|\+0#e000e06&|%|(|e+0#0000000&|l|p|\+0#e000e06&|)|\+0#0000000&|=| @53
+|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p| +0#0000000#ffffff0@60
+|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p|@+0#e000e06#ffffff0|e|n| +0#0000000&@57
+|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|\+0#e000e06#ffffff0|%|(|e+0#0000001#ffff4012|l|p|\+0#e000e06#ffffff0|)|\+0#0000001#ffff4012|=| +0#0000000#ffffff0@53
@75
-|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:|h|e|l|p| @59
-|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:|h|e|l|p|@+0#e000e06&|e|n| +0#0000000&@56
-|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:|h|\+0#e000e06&|%|(|e+0#0000000&|l|p|\+0#e000e06&|)|\+0#0000000&|=| @52
+|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p| +0#0000000#ffffff0@59
+|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p|@+0#e000e06#ffffff0|e|n| +0#0000000&@56
+|l+0#af5f00255&|h|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|\+0#e000e06#ffffff0|%|(|e+0#0000001#ffff4012|l|p|\+0#e000e06#ffffff0|)|\+0#0000001#ffff4012|=| +0#0000000#ffffff0@52
+@75
+@75
+|"+0#0000e05&| |n|o| |t|a|i|l| |c|o|m@1|e|n|t| |o|r| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@41
+@75
+|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p| |"| |n|o|t| |a| |c|o|m@1|e|n|t| +0#0000000#ffffff0@44
+|h+0#af5f00255&|e|l|p|g|r|e|p| +0#0000000&|:+0#0000001#ffff4012|h|e|l|p| ||| |n|o|t| |a| |c|o|m@1|a|n|d| +0#0000000#ffffff0@44
@75
|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/input/vim_ex_help.vim b/runtime/syntax/testdir/input/vim_ex_help.vim
new file mode 100644
index 0000000000000000000000000000000000000000..4d13f3202f9d1e52def1093919051966d1f9d876
GIT binary patch
literal 848
zcmb7=OH0Hs6op+E=0BX)_k#gpK<#P-3%U@5)>&F&8*Q;oN?IHS`s2Oni&!%YH-Vgc
z^5vZCVUw5eGhS3kWLYwiIvzGp&v6ulQ5*)*>kG0RMJ~SZotKYfyjP!yWGWrU(eJv$
zMGFtX>gLwRgA}I?Dkk#8?S_E%8Q$sY&}Z8$Z+Km?go71@-14;N0v}T1ov9vuy}I)e
zN~LyJ5V9kZL5-#%#lN1==S=L7WK6N7;i?`!cGrhT$8RSWXXo){&z%dH3+7#y8g_}A
zR|Ie5$ZmO(NqEcU((A}AW&-98YHwKjeNxL7rmPpLH*sJS7p6D?h->O20agU;j6Yd*
s1S9PTT^QOFV9kX+0u8JoNVmtJ!JamHvX8Z=6FsrjBH7lA<X`1}0FmbQS^xk5
literal 0
HcmV?d00001
diff --git a/runtime/syntax/testdir/input/vim_ex_helpgrep.vim b/runtime/syntax/testdir/input/vim_ex_helpgrep.vim
index aeef4501d..8c686de07 100644
--- a/runtime/syntax/testdir/input/vim_ex_helpgrep.vim
+++ b/runtime/syntax/testdir/input/vim_ex_helpgrep.vim
@@ -1,4 +1,5 @@
" Vim :helpgrep command
+" VIM_TEST_SETUP hi link vimHelpgrepPattern Todo
helpgrep :help
@@ -9,3 +10,9 @@ lhelpgrep :help
lhelpgrep :help@en
lhelpgrep :h\%(elp\)\=
+
+" no tail comment or trailing bar
+
+helpgrep :help " not a comment
+helpgrep :help | not a command
+
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 9a2643479..050880215 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK
gmail.com>
" Doug Kearns <
dougk...@gmail.com>
-" Last Change: 2025 Nov 29
+" Last Change: 2025 Dec 04
" 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] ij[ump] il[ist] int[ro] ip[ut] is[earch] isp[lit] ju[mps] l[ist] lN[ext] lNf[ile] la[st] lab[ove] 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] lop[en] nextgroup=vimBang
-syn keyword vimCommand contained 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
+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] 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] 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] lop[en] lp[revious] nextgroup=vimBang
+syn keyword vimCommand contained 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] sbr[ewind] scr[iptnames] nextgroup=vimBang
+syn keyword vimCommand contained 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] wN[ext] wa[ll] wi[nsize] nextgroup=vimBang
+syn keyword vimCommand contained 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,vimHistory,vimImport,vimLanguage,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,vimHelp,vimHelpgrep,vimHighlight,vimHistory,vimImport,vimLanguage,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
@@ -1514,11 +1514,23 @@ syn region vimMakeArgs contained
syn match vimMakeBarEscape contained "\|"
syn match vimMakeBang contained " \@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep
+" Help*: {{{2
+" =====
+syn match vimHelp "\<h\%[elp]\>" skipwhite nextgroup=vimHelpBang,vimHelpArg,vimHelpNextCommand
+" TODO: match wildcards, ignoring exceptions?
+syn region vimHelpArg contained
+ \ start="\S"
+ \ matchgroup=Special
+ \ end="\%(@ \)\=\ze\s*\%($\|\%x0d\|\%x00\||\s*\S\)"
+ \ oneline
+syn match vimHelpBang contained " \@1<=!" skipwhite nextgroup=vimHelpArg,vimHelpNextCommand
+syn match vimHelpNextCommand contained "\ze|\s*\S" skipwhite nextgroup=vimCmdSep
+
syn match vimHelpgrep "\<l\=helpg\%[rep]\>" skipwhite nextgroup=vimHelpgrepBang,vimHelpgrepPattern
syn region vimHelpgrepPattern contained
\ start="\S"
\ matchgroup=Special
- \ end="@\w\w\>"
+ \ end="@ \>"
\ end="$"
\ contains=@vimSubstList
\ oneline
@@ -2576,6 +2588,8 @@ if !exists("skip_vim_syntax_inits")
hi def link vimGroupRem vimSynOption
hi def link vimGroupSpecial Special
hi def link vimGroup Type
+ hi def link vimHelp vimCommand
+ hi def link vimHelpBang vimBang
hi def link vimHelpgrep vimCommand
hi def link vimHiAttrib PreProc
hi def link vimHiBang vimBang