runtime(vim): Update base-syntax, improve :normal highlighting

Commit: 
https://github.com/vim/vim/commit/bbe5252c2c2a6a49c794719a894ab10cdafebc62
Author: Doug Kearns <dougkea...@gmail.com>
Date:   Sat Nov 9 19:11:25 2024 +0100

    runtime(vim): Update base-syntax, improve :normal highlighting
    
    Fix command name termination, match bang, and allow a line-continued
    argument.
    
    closes: #15358
    
    Signed-off-by: Doug Kearns <dougkea...@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/generator/vim.vim.base 
b/runtime/syntax/generator/vim.vim.base
index 9088af103..6d67d7b93 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 <dougkea...@gmail.com>
-" Last Change:    2024 Oct 05
+" Last Change:    2024 Oct 08
 " Former Maintainer: Charles E. Campbell
 
 " DO NOT CHANGE DIRECTLY.
@@ -202,7 +202,7 @@ syn match   vimNumber       '\%(^\|\A\)\zs#\x\{6}'          
skipwhite nextgroup=vimGlobal,vimSub
 syn case match
 
 " All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
+syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
 syn cluster vim9CmdList        
contains=vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
 syn match vimCmdSep    "[:|]\+"        skipwhite 
nextgroup=@vimCmdList,vimSubst1
 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
@@ -214,6 +214,7 @@ syn match vimVar            "\s\zs&t_\S[a-zA-Z0-9]\>"
 syn match vimVar               "\s\zs&t_k;"
 syn match vimFBVar      contained   "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
 syn keyword vimCommand  contained      in
+syn match vimBang            contained "!"
 
 syn cluster vimExprList        
contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList
 syn cluster vim9ExprList       contains=vim9Boolean,vim9Null
@@ -811,10 +812,10 @@ syn keyword       vimMatchNone    contained       none
 syn case match
 syn region     vimMatchPattern contained       matchgroup=Delimiter 
start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\|\\z1" end="\z1" 
contains=@vimSubstList oneline
 
-" Norm: {{{2
-" ====
-syn match      vimNorm         "\<norm\%[al]!\=" skipwhite 
nextgroup=vimNormCmds
-syn match      vimNormCmds contained   ".*$"
+" Normal: {{{2
+" ======
+syn match      vimNormal               "\<norm\%[al]\>!\=" skipwhite 
nextgroup=vimNormalArg contains=vimBang
+syn region     vimNormalArg    contained       start="\S" skip=+
\s*\\|
\s*["#]\ + end="$" contains=@vimContinue
 
 " Sleep: {{{2
 " =====
@@ -1371,7 +1372,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimMenutranslateComment   vimComment
  hi def link vim9MethodName    vimFuncName
  hi def link vimMtchComment    vimComment
- hi def link vimNorm   vimCommand
+ hi def link vimNormal vimCommand
  hi def link vimNotation       Special
  hi def link vimNotFunc        vimCommand
  hi def link vimNotPatSep      vimString
diff --git a/runtime/syntax/testdir/dumps/vim_ex_normal_00.dump 
b/runtime/syntax/testdir/dumps/vim_ex_normal_00.dump
new file mode 100644
index 000000000..60a453784
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_normal_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|n|o|r|m|a|l| |c|o|m@1|a|n|d| +0#0000000&@53
+@75
+|n+0#af5f00255&|o|r|m|a|l| +0#0000000&|j| @66
+|n+0#af5f00255&|o|r|m|a|l|!| +0#0000000&|j| @65
+|n+0#af5f00255&|o|r|m|a|l|!|j+0#0000000&| @66
+@75
+|"+0#0000e05&| |n|o| |t|r|a|i|l|i|n|g| |b|a|r| +0#0000000&@57
+|n+0#af5f00255&|o|r|m|a|l| +0#0000000&|j| |4|2|||e|c|h|o| |"|n|o|t| |e|c|h|o| 
|c|o|m@1|a|n|d|"| @39
+@75
+|"+0#0000e05&| |n|o| |t|r|a|i|l|i|n|g| |c|o|m@1|e|n|t| +0#0000000&@53
+|n+0#af5f00255&|o|r|m|a|l| +0#0000000&|j| |"|0|p| @62
+@75
+|"+0#0000e05&| |m|u|l|t|i|l|i|n|e| |a|r|g| +0#0000000&@59
+|n+0#af5f00255&|o|r|m|a|l| +0#0000000&|j| @66
+@6|\+0#e000e06&|k+0#0000000&| @66
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&|j+0#0000000&| @66
+@75
+|"+0#0000e05&| |w|o|r|d|-|b|o|u|n|d|a|r|y| |r|e|q|u|i|r|e|d| |a|f|t|e|r| 
|n|a|m|e| |(|o|l|d| |b|u|g|)| +0#0000000&@29
+@57|1|,|1| @10|T|o|p| 
diff --git a/runtime/syntax/testdir/dumps/vim_ex_normal_01.dump 
b/runtime/syntax/testdir/dumps/vim_ex_normal_01.dump
new file mode 100644
index 000000000..b6fa3b87c
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_normal_01.dump
@@ -0,0 +1,20 @@
+|n+0#af5f00255#ffffff0|o|r|m|a|l| +0#0000000&|j| @66
+@6|\+0#e000e06&|k+0#0000000&| @66
+@6|"+0#0000e05&|\| |c|o|m@1|e|n|t| +0#0000000&@58
+@6|\+0#e000e06&|j+0#0000000&| @66
+@75
+>"+0#0000e05&| |w|o|r|d|-|b|o|u|n|d|a|r|y| |r|e|q|u|i|r|e|d| |a|f|t|e|r| 
|n|a|m|e| |(|o|l|d| |b|u|g|)| +0#0000000&@29
+|n|o|r|m|a|l|j| @67
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|9|,|1| @9|B|o|t| 
diff --git a/runtime/syntax/testdir/input/vim_ex_normal.vim 
b/runtime/syntax/testdir/input/vim_ex_normal.vim
new file mode 100644
index 000000000..174a3c7fb
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_normal.vim
@@ -0,0 +1,20 @@
+" Vim :normal command
+
+normal j
+normal! j
+normal!j
+
+" no trailing bar
+normal j 42|echo "not echo command"
+
+" no trailing comment
+normal j "0p
+
+" multiline arg
+normal j
+      \k
+      "\ comment
+      \j
+
+" word-boundary required after name (old bug)
+normalj
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 28fdda521..eea6e82a8 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -240,7 +240,7 @@ syn match   vimNumber       '\%(^\|\A\)\zs#\x\{6}'          
skipwhite nextgroup=vimGlobal,vimSub
 syn case match
 
 " All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
+syn cluster vimCmdList 
contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
 syn cluster vim9CmdList        
contains=vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
 syn match vimCmdSep    "[:|]\+"        skipwhite 
nextgroup=@vimCmdList,vimSubst1
 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
@@ -252,6 +252,7 @@ syn match vimVar            "\s\zs&t_\S[a-zA-Z0-9]\>"
 syn match vimVar               "\s\zs&t_k;"
 syn match vimFBVar      contained   "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
 syn keyword vimCommand  contained      in
+syn match vimBang            contained "!"
 
 syn cluster vimExprList        
contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList
 syn cluster vim9ExprList       contains=vim9Boolean,vim9Null
@@ -857,10 +858,10 @@ syn keyword       vimMatchNone    contained       none
 syn case match
 syn region     vimMatchPattern contained       matchgroup=Delimiter 
start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\|\\z1" end="\z1" 
contains=@vimSubstList oneline
 
-" Norm: {{{2
-" ====
-syn match      vimNorm         "\<norm\%[al]!\=" skipwhite 
nextgroup=vimNormCmds
-syn match      vimNormCmds contained   ".*$"
+" Normal: {{{2
+" ======
+syn match      vimNormal               "\<norm\%[al]\>!\=" skipwhite 
nextgroup=vimNormalArg contains=vimBang
+syn region     vimNormalArg    contained       start="\S" skip=+
\s*\\|
\s*["#]\ + end="$" contains=@vimContinue
 
 " Sleep: {{{2
 " =====
@@ -1417,7 +1418,7 @@ if !exists("skip_vim_syntax_inits")
  hi def link vimMenutranslateComment   vimComment
  hi def link vim9MethodName    vimFuncName
  hi def link vimMtchComment    vimComment
- hi def link vimNorm   vimCommand
+ hi def link vimNormal vimCommand
  hi def link vimNotation       Special
  hi def link vimNotFunc        vimCommand
  hi def link vimNotPatSep      vimString

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1t9pzD-009V8y-NI%40256bit.org.

Raspunde prin e-mail lui