neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1240d29f8fcf390bcd2cb2fd6e916c629364009a
parent 94d09d66271ef2929eda4d31b348b419861d6941
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sat,  2 Aug 2025 19:35:21 +0800

vim-patch:b88f9e4: runtime(vim): Update base syntax, fix :map termination in :command RHS (#35131)

Ensure :map (and :abbreviate) terminate at | when included in :command
replacement strings containing commands separated by line continuations.

https://github.com/vim/vim/commit/b88f9e4a04ce9fb70abb7cdae17688aa4f49c8c9

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat:
Mruntime/syntax/vim.vim | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim @@ -1365,9 +1365,20 @@ syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation, syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs syn match vimMapMod contained "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs -syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader skipnl nextgroup=vimMapRhsContinue -" assume a continuation comment introduces the RHS -syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader +syn region vimMapRhs contained + \ start="\S" + \ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+ + \ end="\ze|" + \ end="$" + \ nextgroup=vimCmdSep + \ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader +syn region vimMapRhsContinue contained + \ start=+^\s*\%(\\\|["#]\\ \)+ + \ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+ + \ end="\ze|" + \ end="$" + \ nextgroup=vimCmdSep + \ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey syn keyword vimMapModKey contained buffer expr nowait script silent special unique syn case ignore