vim-patch:76d62985c1ff (#27985)

runtime(vim): Update base-syntax, remove old unused syntax groups. (vim/vim#14146)

Remove old unused syntax groups.

- vimRegion, vimPattern and vimKeyword removed in Vim 5.3.
- vimAuSyntax, vimAutoCmdOpt, vimAutoSet and vimStatement removed in 5.6.

The following were linked in :hi commands but never defined with :syn
and, most likely, never used:
 - vimHLMod introduced in 5.0.
 - vimKeycode and vimKeycodeError introduced in 5.4.
 - vimElseif introduced in 5.6.
 - vimFold introduced in 6.4.
 - vimOperStar (and vimoperStar) introduced in 9.0.

76d62985c1

Co-authored-by: dkearns <dougkearns@gmail.com>
This commit is contained in:
zeertzjq 2024-03-23 06:43:25 +08:00 committed by GitHub
parent 849d82b80b
commit a44ac26c75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,7 +197,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,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vim9Comment,vimString,vimSubst,vimRegister,vimCmplxRepeat,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
@ -219,7 +219,7 @@ syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperPa
syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile
syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=vimoperStar,@vimOperGroup
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
syn match vimOperError ")"
@ -272,8 +272,6 @@ endif
syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>"
syn match vimFuncBlank contained "\s\+"
syn keyword vimPattern contained start skip end
" Types: {{{2
" =====
" vimTypes : new for vim9
@ -292,8 +290,7 @@ syn cluster vimType contains=vimType,vimCompoundType,vimUserType
" Keymaps: (Vim Project Addition) {{{2
" =======
" TODO: autogenerated vimCommand keyword list does not handle all abbreviations
" : handle Vim9 script comments when something like #13104 is merged
" TODO: handle Vim9 script comments when something like #13104 is merged
syn match vimKeymapStart "^" contained skipwhite nextgroup=vimKeymapLhs,vimKeymapLineComment
syn match vimKeymapLhs "\S\+" contained skipwhite nextgroup=vimKeymapRhs contains=vimNotation
syn match vimKeymapRhs "\S\+" contained skipwhite nextgroup=vimKeymapTailComment contains=vimNotation
@ -314,7 +311,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
syn cluster vimUserCmdList contains=@vimCmdList,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimNotation,vimNumber,vimOper,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"
@ -463,6 +460,7 @@ VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(
" For: {{{2
" ===
syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
" Abbreviations: {{{2
" =============
" GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
@ -616,7 +614,6 @@ if has("conceal")
endif
syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment,vim9Comment
syn cluster vimFuncBodyList add=vimSyntax
" Syntax: case {{{2
@ -984,7 +981,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHiAttribList vimError
hi def link vimHiCtermError vimError
hi def link vimHiKeyError vimError
hi def link vimKeyCodeError vimError
hi def link vimMapModErr vimError
hi def link vimSubstFlagErr vimError
hi def link vimSynCaseError vimError
@ -997,12 +993,9 @@ if !exists("skip_vim_syntax_inits")
hi def link vimAugroupBang vimBang
hi def link vimAugroupError vimError
hi def link vimAugroupKey vimCommand
hi def link vimAuHighlight vimHighlight
hi def link vimAutoCmdOpt vimOption
hi def link vimAutoCmd vimCommand
hi def link vimAutoEvent Type
hi def link vimAutoCmdMod Special
hi def link vimAutoSet vimCommand
hi def link vimBang vimOper
hi def link vimBehaveBang vimBang
hi def link vimBehaveModel vimBehave
@ -1026,7 +1019,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimEchohlNone vimGroup
hi def link vimEchohl vimCommand
hi def link vimElseIfErr Error
hi def link vimElseif vimCondHL
hi def link vimEndfunction vimCommand
hi def link vimEnddef vimCommand
hi def link vimEnvvar PreProc
@ -1035,7 +1027,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimFBVar vimVar
hi def link vimFgBgAttrib vimHiAttrib
hi def link vimFuncEcho vimCommand
hi def link vimFold Folded
hi def link vimFor vimCommand
hi def link vimFTCmd vimCommand
hi def link vimFTOption vimSynType
@ -1072,13 +1063,10 @@ if !exists("skip_vim_syntax_inits")
hi def link vimHiStartStop vimHiTerm
hi def link vimHiTerm Type
hi def link vimHLGroup vimGroup
hi def link vimHLMod PreProc
hi def link vimInsert vimString
hi def link vimIskSep Delimiter
hi def link vimKeyCode vimSpecFile
hi def link vimKeymapLineComment vimComment
hi def link vimKeymapTailComment vimComment
hi def link vimKeyword Statement
hi def link vimLet vimCommand
hi def link vimLetHereDoc vimString
hi def link vimLetHereDocStart Special
@ -1109,7 +1097,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimNumber Number
hi def link vimOperError Error
hi def link vimOper Operator
hi def link vimOperStar vimOper
hi def link vimOption PreProc
hi def link vimParenSep Delimiter
hi def link vimPatSepErr vimError
@ -1131,7 +1118,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSpecFile Identifier
hi def link vimSpecFileMod vimSpecFile
hi def link vimSpecial Type
hi def link vimStatement Statement
hi def link vimStringCont vimString
hi def link vimString String
hi def link vimStringEnd vimString