mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:a9b5e4a: runtime(vim): Update base-syntax and generator, generate command modifiers
Generate Ex command modifiers from the modifier table in src/ex_docmd.c
closes: vim/vim#17564
a9b5e4af43
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
@@ -30,6 +30,11 @@ endfunction
|
|||||||
syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||||
|
|
||||||
|
" GEN_SYN_VIM: vimCommand modifier, START_STR='syn keyword vimCommandModifier', END_STR='skipwhite nextgroup=vimCommandModifierBang,@vimCmdList'
|
||||||
|
syn keyword vimCommandModifier abo[veleft] bel[owright] bo[tright] bro[wse] conf[irm] hid[e] hor[izontal] kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] lefta[bove] leg[acy] loc[kmarks] noa[utocmd] nos[wapfile] rightb[elow] san[dbox] sil[ent] tab to[pleft] uns[ilent] verb[ose] vert[ical] vim9[cmd] skipwhite nextgroup=vimCommandModifierBang,@vimCmdList
|
||||||
|
" :filter is handled specially elsewhere
|
||||||
|
syn match vimCommandModifierBang contained "\a\@1<=!" skipwhite nextgroup=@vimCmdList
|
||||||
|
|
||||||
" Special and plugin vim commands {{{2
|
" Special and plugin vim commands {{{2
|
||||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||||
syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint]
|
syn keyword vimOnlyCommand contained fix[del] op[en] sh[ell] P[rint]
|
||||||
@@ -212,7 +217,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,vimConst,vimDoautocmd,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,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,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,vimDelcommand,vimDelFunction,@vimEcho,vimElse,vimEnddef,vimEndfunction,vimEndif,vimExecute,vimIsCommand,vimExtCmd,vimExFilter,vimExMark,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,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimVimgrep,vimVimgrepadd,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
|
||||||
@@ -1232,7 +1237,6 @@ syn region vimExecute
|
|||||||
" Filter: {{{2
|
" Filter: {{{2
|
||||||
" ======
|
" ======
|
||||||
syn match vimExFilter "\<filt\%[er]\>" skipwhite nextgroup=vimExFilterBang,vimExFilterPattern
|
syn match vimExFilter "\<filt\%[er]\>" skipwhite nextgroup=vimExFilterBang,vimExFilterPattern
|
||||||
syn match vimExFilterBang contained "\a\@1<=!" skipwhite nextgroup=vimExFilterPattern
|
|
||||||
syn region vimExFilterPattern contained
|
syn region vimExFilterPattern contained
|
||||||
\ start="[[:ident:]]"
|
\ start="[[:ident:]]"
|
||||||
\ end="\ze[[:space:]\n]"
|
\ end="\ze[[:space:]\n]"
|
||||||
@@ -1247,6 +1251,7 @@ syn region vimExFilterPattern contained
|
|||||||
\ skipwhite nextgroup=@vimCmdList
|
\ skipwhite nextgroup=@vimCmdList
|
||||||
\ contains=@vimSubstList
|
\ contains=@vimSubstList
|
||||||
\ oneline
|
\ oneline
|
||||||
|
syn match vimExFilterBang contained "\a\@1<=!" skipwhite nextgroup=vimExFilterPattern
|
||||||
|
|
||||||
" Grep and Make: {{{2
|
" Grep and Make: {{{2
|
||||||
" =============
|
" =============
|
||||||
@@ -2160,6 +2165,8 @@ if !exists("skip_vim_syntax_inits")
|
|||||||
hi def link vimCatch vimCommand
|
hi def link vimCatch vimCommand
|
||||||
hi def link vimCmplxRepeat SpecialChar
|
hi def link vimCmplxRepeat SpecialChar
|
||||||
hi def link vimCommand Statement
|
hi def link vimCommand Statement
|
||||||
|
hi def link vimCommandModifier vimCommand
|
||||||
|
hi def link vimCommandModifierBang vimBang
|
||||||
hi def link vimComment Comment
|
hi def link vimComment Comment
|
||||||
hi def link vimCommentError vimError
|
hi def link vimCommentError vimError
|
||||||
hi def link vimCommentString vimString
|
hi def link vimCommentString vimString
|
||||||
@@ -2194,7 +2201,7 @@ if !exists("skip_vim_syntax_inits")
|
|||||||
hi def link vimError Error
|
hi def link vimError Error
|
||||||
hi def link vimEscape Special
|
hi def link vimEscape Special
|
||||||
hi def link vimExFilter vimCommand
|
hi def link vimExFilter vimCommand
|
||||||
hi def link vimExFilterBang vimCommand
|
hi def link vimExFilterBang vimBang
|
||||||
hi def link vimExMark vimCommand
|
hi def link vimExMark vimCommand
|
||||||
hi def link vimFBVar vimVar
|
hi def link vimFBVar vimVar
|
||||||
hi def link vimFgBgAttrib vimHiAttrib
|
hi def link vimFgBgAttrib vimHiAttrib
|
||||||
|
Reference in New Issue
Block a user