runtime(vim): Update base-syntax, improve :highlight command (#14228)
Commit:
https://github.com/vim/vim/commit/9530fe4f3a69c6bd11fc745d3b2d1667cdd0cf6d
Author: dkearns <[email protected]>
Date: Tue Mar 19 05:19:51 2024 +1100
runtime(vim): Update base-syntax, improve :highlight command
(https://github.com/vim/vim/issues/14228)
Improve :highlight command highlighting
- Use the same highlight groups for "default link" with and without
bang.
- Match some common line-continuation use.
- Match :hi clear variants.
- Highlight color-name values.
Resync vim.vim and generator/vim.vim.base.
Signed-off-by: Doug Kearns <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/generator/vim.vim.base
b/runtime/syntax/generator/vim.vim.base
index 2d9a2d34b..6527be425 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 <[email protected]>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: 2024 Mar 10
+" Last Change: 2024 Mar 18
" Former Maintainer: Charles E. Campbell
" Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
" Base File Version: 9.0-25
@@ -541,8 +541,9 @@ syn case match
" User Function Highlighting: {{{2
" (following Gautam Iyer's suggestion)
" ==========================
-syn match vimFunc
"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*("
contains=vimFuncName,vimUserFunc,vimExecute
-syn match vimUserFunc contained
"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>"
contains=vimNotation
+syn match vimFunc
"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*("
contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
+syn match vimUserFunc contained
"\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>"
contains=vimNotation
+syn keyword vimFuncEcho contained ec ech echo
" User Command Highlighting: {{{2
syn match vimUsrCmd
'^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
@@ -678,7 +679,7 @@ if !exists("g:vimsyn_noerror") &&
!exists("g:vimsyn_novimhictermerror")
syn match vimHiCtermError contained "\D\i*"
endif
syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite
nextgroup=vimHiBang,@vimHighlightCluster
-syn match vimHiBang contained "!" skipwhite
nextgroup=@vimHighlightCluster
+syn match vimHiBang contained " \@1<=!" skipwhite
nextgroup=@vimHighlightCluster
syn match vimHiGroup contained "\i\+"
syn case ignore
@@ -698,12 +699,12 @@ syn match vimHiGuiRgb contained "#\x\{6}"
" Highlighting: hi group key=arg ... {{{2
syn cluster vimHiCluster
contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
-syn region vimHiKeyList contained oneline start="\i\+" skip="\\\|\|"
end="$\||" contains=@vimHiCluster
+syn region vimHiKeyList contained start="\i\+" skip=+\\\|\|\|
\s*\\|
\s*"\ + matchgroup=vimCmdSep end="|" excludenl end="$"
contains=@vimContinue,@vimHiCluster
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
syn match vimHiKeyError contained "\i\+="he=e-1
endif
syn match vimHiTerm contained "
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1rmHkO-009Vm1-1G%40256bit.org.