diff options
author | dkearns <dougkearns@gmail.com> | 2024-03-05 05:15:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 19:15:42 +0100 |
commit | e5c9ba6015735b8b12e35dc5873bfc957dcbb600 (patch) | |
tree | 4e4d57faa0896939d1a125e1e363a85e85f1992a /runtime/syntax/generator | |
parent | 1bdc9435c1a14ca1a30e5b5927ab63f603ec4409 (diff) |
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>
Diffstat (limited to 'runtime/syntax/generator')
-rw-r--r-- | runtime/syntax/generator/gen_syntax_vim.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/generator/update_date.vim | 2 | ||||
-rw-r--r-- | runtime/syntax/generator/vim.vim.base | 14 |
3 files changed, 6 insertions, 12 deletions
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index 501d64c93e..596fa7b9c8 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -2,7 +2,7 @@ " Language: Vim script " Maintainer: Hirohito Higashi (h_east) " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: Mar 02, 2024 +" Last Change: 2024 Mar 02 " Version: 2.0.4 let s:keepcpo= &cpo diff --git a/runtime/syntax/generator/update_date.vim b/runtime/syntax/generator/update_date.vim index 54eb4edb42..35561897c3 100644 --- a/runtime/syntax/generator/update_date.vim +++ b/runtime/syntax/generator/update_date.vim @@ -7,7 +7,7 @@ normal gg let pat = '^"\s*Last\s*Change:\s\+' let lnum = search(pat, 'We', 10) if lnum > 0 - exec 'norm! lD"=strftime("%b %d, %Y")' . "\rp" + exec 'norm! lD"=strftime("%Y %b %d")' . "\rp" silent update endif quitall! diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index 4cb75d4ac0..f26a94a19c 100644 --- 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: Mar 03, 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 @@ -208,7 +208,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 @@ -239,7 +239,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 @@ -286,7 +286,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" @@ -576,7 +576,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 @@ -592,21 +591,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 @@ -627,7 +623,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 " ============ @@ -700,7 +695,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 " ================== |