changeset 34617:624afe810083

runtime(vim): Update base-syntax, remove old unused syntax groups. (#14146) Commit: https://github.com/vim/vim/commit/76d62985c1ffbd7669ccc628ca43445d14c5aba6 Author: dkearns <dougkearns@gmail.com> Date: Sat Mar 23 05:55:25 2024 +1100 runtime(vim): Update base-syntax, remove old unused syntax groups. (https://github.com/vim/vim/issues/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. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 22 Mar 2024 20:00:05 +0100
parents 93227449c6b4
children 7ff3c277377f
files runtime/syntax/generator/vim.vim.base runtime/syntax/vim.vim
diffstat 2 files changed, 12 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -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 Mar 19
+" Last Change:	2024 Mar 22
 " Former Maintainer: Charles E. Campbell
 " Base File URL:     http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
 " Base File Version: 9.0-25
@@ -209,7 +209,7 @@ syn keyword vimFTOption contained	detect
 
 " 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
@@ -231,7 +231,7 @@ syn cluster	vimOperGroup	contains=vimEnv
 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	")"
@@ -284,8 +284,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
@@ -304,8 +302,7 @@ syn cluster vimType contains=vimType,vim
 " 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
@@ -326,7 +323,7 @@ syn match	vimSpecFileMod	"\(:[phtre]\)\+
 
 " 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"
@@ -475,6 +472,7 @@ syn keyword	vimLet	var		skipwhite nextgr
 " 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'
@@ -624,7 +622,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
@@ -987,7 +984,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
@@ -1000,12 +996,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
@@ -1029,7 +1022,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
@@ -1038,7 +1030,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
@@ -1074,13 +1065,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
@@ -1111,7 +1099,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
@@ -1133,7 +1120,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
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -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 Mar 19
+" Last Change:	2024 Mar 22
 " 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
 
 " 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
@@ -268,7 +268,7 @@ syn cluster	vimOperGroup	contains=vimEnv
 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	")"
@@ -321,8 +321,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
@@ -341,8 +339,7 @@ syn cluster vimType contains=vimType,vim
 " 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
@@ -363,7 +360,7 @@ syn match	vimSpecFileMod	"\(:[phtre]\)\+
 
 " 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"
@@ -513,6 +510,7 @@ syn keyword	vimLet	var		skipwhite nextgr
 " 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'
@@ -667,7 +665,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
@@ -1030,7 +1027,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
@@ -1043,12 +1039,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
@@ -1072,7 +1065,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
@@ -1081,7 +1073,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
@@ -1117,13 +1108,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
@@ -1154,7 +1142,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
@@ -1176,7 +1163,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