From c58566a5ab72a5b6a225307208b74d73fed33bfe Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 13 Feb 2025 09:01:44 +0800 Subject: [PATCH] vim-patch:4a530a6: runtime(vim): Update base-syntax, match :debuggreedy count prefix Match :0debuggreedy as a special case until better range/count support is implemented. closes: vim/vim#16572 https://github.com/vim/vim/commit/4a530a632bb220b9aec827a12ab211a563c5583d Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index c4e231d145..37a4719e11 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -195,9 +195,10 @@ 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,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDebuggreedy,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=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 +syn match vimCount contained "\d\+" syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" nextgroup=vimBang contains=vimCommand syn match vimBang contained "!" syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" @@ -233,6 +234,11 @@ syn keyword vimBehaveModel contained mswin xterm " ==== syn match vimCall "\" skipwhite nextgroup=vimFunc +" Debuggready {{{2 +" =========== +" TODO: special-cased until generalised range/count support is implemented +syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount + " Exception Handling {{{2 syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern @@ -1307,7 +1313,9 @@ if !exists("skip_vim_syntax_inits") hi def link vimConst vimCommand hi def link vimContinue Special hi def link vimContinueComment vimComment + hi def link vimCount Number hi def link vimCtrlChar SpecialChar + hi def link vimDebuggreedy vimCommand hi def link vimDefComment vim9Comment hi def link vimDefKey vimCommand hi def link vimDefParam vimVar