runtime(vim): Update base-syntax, improve :menu{,translate} highlighting (#14162)
Commit: https://github.com/vim/vim/commit/62b26040eb4b6752be2c46852e8986083737a1bb Author: dkearns <dougkea...@gmail.com> Date: Sun Mar 10 03:43:28 2024 +1100 runtime(vim): Update base-syntax, improve :menu{,translate} highlighting (https://github.com/vim/vim/issues/14162) Improve :menu and :menutranslate highlighting. - Match args to :menutranslation and :popup. - Only highlight special notation in {rhs} of :menu, like :map. - Allow line continuations in {rhs} of :menu and between {english} and {mylang} of :menutranslation, matching common usage. - Bug fixes. Signed-off-by: Doug Kearns <dougkea...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim index 596fa7b9c..1aa55f4df 100644 --- a/runtime/syntax/generator/gen_syntax_vim.vim +++ b/runtime/syntax/generator/gen_syntax_vim.vim @@ -2,8 +2,8 @@ " Language: Vim script " Maintainer: Hirohito Higashi (h_east) " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 02 -" Version: 2.0.4 +" Last Change: 2024 Mar 09 +" Version: 2.0.5 let s:keepcpo= &cpo set cpo&vim @@ -271,7 +271,7 @@ function! s:get_vim_command_type(cmd_name) " 6: mapclear " 7: unmap " 99: (Exclude registration of "syn keyword") - let menu_prefix = '^\%([acinosvx]\?\|tl\)' + let menu_prefix = '^\%([acinostvx]\?\|tl\)' let map_prefix = '^[acilnostvx]\?' let echo_suffix = '\%(n\|hl\|msg\|window\|err\|console\|\)$' let exclude_list = [ @@ -284,7 +284,7 @@ function! s:get_vim_command_type(cmd_name) \ 'behave', 'augroup', 'normal', 'syntax', \ 'append', 'insert', \ 'Next', 'Print', 'X', - \ 'new', + \ 'new', 'popup', \ ] " Required for original behavior " \ 'global', 'vglobal' diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base index f26a94a19..5fc0d089e 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 <dougkea...@gmail.com> " URL: https://github.com/vim-jp/syntax-vim-ex -" Last Change: 2024 Mar 04 +" Last Change: 2024 Mar 09 " Former Maintainer: Charles E. Campbell " Base File URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Base File Version: 9.0-25 @@ -166,7 +166,7 @@ syn match vimNumber '0[0-7]\+' skipwhite nextgroup=vimGlobal,vimSubst1,v syn match vimNumber '0[bB][01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,vimCommand,vimComment,vim9Comment " All vimCommands are contained by vimIsCommand. {{{2 -syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd +syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1 syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" @@ -478,15 +478,27 @@ syn case match " Menus: {{{2 " ===== -syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod -" GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimCommand', END_STR='skipwhite nextgroup=@vimMenuList' -syn match vimMenuName "[^ \<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap -syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName -syn match vimMenuNameMore " -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1rizom-009HXW-0X%40256bit.org.