mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (#14137)
* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups - Remove contained :syntax and :highlight sub-groups from the function body cluster. These should only match in the respective commands. - Remove vimSynLine syntax group from several clusters. The definition of vimSynLine was removed in Vim 5.3. * runtime(vim): Update syntax generator, use standard Last Change date format The de facto standard date format is YYYY MMM DD. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -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: Mar 04, 2024
|
||||
" Last Change: 2024 Mar 04
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Base File Version: 9.0-25
|
||||
@@ -246,7 +246,7 @@ syn keyword vimFTOption contained detect indent off on plugin
|
||||
|
||||
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
|
||||
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
|
||||
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
|
||||
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimRegion,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
|
||||
syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
|
||||
syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
|
||||
@@ -277,7 +277,7 @@ endif
|
||||
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2
|
||||
" =========
|
||||
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
|
||||
syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimSynLine
|
||||
syn cluster vimFuncBodyList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimLetHereDoc,vimLineComment,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst
|
||||
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def\s\+new\i\{-}(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
@@ -324,7 +324,7 @@ syn match vimSpecFileMod "\(:[phtre]\)\+" contained
|
||||
|
||||
" User-Specified Commands: {{{2
|
||||
" =======================
|
||||
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
|
||||
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange
|
||||
syn keyword vimUserCommand contained com[mand]
|
||||
syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
|
||||
syn match vimUserAttrbError contained "-\a\+\ze\s"
|
||||
@@ -621,7 +621,6 @@ syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName
|
||||
syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="$\||" contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError
|
||||
syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
|
||||
syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
|
||||
syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem
|
||||
|
||||
" Syntax: foldlevel {{{2
|
||||
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
|
||||
@@ -637,21 +636,18 @@ syn match vimIskSep contained ','
|
||||
|
||||
" Syntax: include {{{2
|
||||
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: keyword {{{2
|
||||
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
|
||||
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
|
||||
syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
|
||||
syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: match {{{2
|
||||
syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
|
||||
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
||||
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
|
||||
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
syn cluster vimFuncBodyList add=vimSynMtchGroup
|
||||
|
||||
" Syntax: off and on {{{2
|
||||
syn keyword vimSynType contained enable list manual off on reset
|
||||
@@ -672,7 +668,6 @@ syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
|
||||
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
|
||||
syn match vimSynNotPatRange contained "\\\\\|\\\["
|
||||
syn match vimMtchComment contained '"[^"]\+$'
|
||||
syn cluster vimFuncBodyList add=vimSynType
|
||||
|
||||
" Syntax: sync {{{2
|
||||
" ============
|
||||
@@ -745,7 +740,6 @@ syn keyword vimHiClear contained clear nextgroup=vimHiGroup
|
||||
" see tst24 (hi def vs hi) (Jul 06, 2018)
|
||||
"syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation
|
||||
syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=@vimHiCluster
|
||||
syn cluster vimFuncBodyList add=vimHiLink
|
||||
|
||||
" Control Characters: {{{2
|
||||
" ==================
|
||||
|
Reference in New Issue
Block a user