diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-01-24 09:59:41 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-24 11:05:25 +0100 |
commit | 9808a781d36b22f442eb7cb7e1246f405caa7255 (patch) | |
tree | 2d41f0301d92d6e58918bf67bb9a82c07a6476a1 | |
parent | f4acacdb538681a43ff935a05a3462d0a735f955 (diff) | |
download | rneovim-9808a781d36b22f442eb7cb7e1246f405caa7255.tar.gz rneovim-9808a781d36b22f442eb7cb7e1246f405caa7255.tar.bz2 rneovim-9808a781d36b22f442eb7cb7e1246f405caa7255.zip |
vim-patch:9c5b90db035b
runtime(vim): Update syntax file (vim/vim#13906)
Highlight :2match and :3match and add these to :help ex-cmd-index.
https://github.com/vim/vim/commit/9c5b90db035b0e488f4cc686514a8d2a42265eb2
Co-authored-by: dkearns <dougkearns@gmail.com>
-rw-r--r-- | runtime/doc/index.txt | 2 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 75b12fece2..c1a8aec40e 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1146,6 +1146,8 @@ tag command action ~ |:>| :> shift lines one 'shiftwidth' right |:@| :@ execute contents of a register |:@@| :@@ repeat the previous ":@" +|:2match| :2mat[ch] define a second match to highlight +|:3match| :3mat[ch] define a third match to highlight |:Next| :N[ext] go to previous file in the argument list |:append| :a[ppend] append text |:abbreviate| :ab[breviate] enter abbreviation diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 049c18bba1..71556b4848 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -59,6 +59,9 @@ syn keyword vimOnlyHLGroup contained LineNrAbove LineNrBelow StatusLineTerm Term syn keyword nvimHLGroup contained Substitute TermCursor TermCursorNC "}}}2 syn case match + +syn keyword vimCommand contained 2mat[ch] 3mat[ch] + " Special Vim Highlighting (not automatic) {{{1 " Set up folding commands for this syntax highlighting file {{{2 @@ -150,7 +153,7 @@ syn match vimNumber '0[bB][01]\+' skipwhite nextgroup=vimGlobal,vimSubst " All vimCommands are contained by vimIsCommand. {{{2 syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimExtCmd,vimFilter,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd -syn match vimIsCommand "\<\h\w*\>" contains=vimCommand +syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" syn match vimVar "\s\zs&\%([lg]:\)\=\a\+\>" |