mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
runtime(vim): Update base-syntax, improve :match command highlighting
Match group and pattern arguments to :match commands. closes: #15096 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
9d779c514f
commit
e85fdc730e
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" URL: https://github.com/vim-jp/syntax-vim-ex
|
||||
" Last Change: 2024 Jun 21
|
||||
" Last Change: 2024 Jul 05
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@@ -29,8 +29,6 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
" regular vim commands {{{2
|
||||
" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
|
||||
|
||||
syn keyword vimCommand contained 2mat[ch] 3mat[ch]
|
||||
|
||||
" Lower priority for _new_ to distinguish constructors from the command.
|
||||
syn match vimCommand contained "\<new\>(\@!"
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
@@ -175,7 +173,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,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
|
||||
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimMatch,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
|
||||
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||
syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
|
||||
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
|
||||
@@ -652,6 +650,15 @@ endif
|
||||
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
|
||||
|
||||
" Match: {{{2
|
||||
" =====
|
||||
syn match vimMatch "\<[23]\=mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone
|
||||
syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern
|
||||
syn case ignore
|
||||
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
|
||||
@@ -1173,6 +1180,9 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimMap vimCommand
|
||||
hi def link vimMark Number
|
||||
hi def link vimMarkNumber vimNumber
|
||||
hi def link vimMatch vimCommand
|
||||
hi def link vimMatchGroup vimGroup
|
||||
hi def link vimMatchNone vimGroup
|
||||
hi def link vimMenuBang vimBang
|
||||
hi def link vimMenuClear Special
|
||||
hi def link vimMenuMod vimMapMod
|
||||
|
Reference in New Issue
Block a user