runtime(vim): Update base syntax, fix :map termination in :command RHS

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

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
Doug Kearns
2025-07-29 21:03:52 +10:00
committed by dkearns
parent 0fde6aebdd
commit b88f9e4a04
26 changed files with 275 additions and 136 deletions

View File

@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Jul 24
" Last Change: 2025 Jul 29
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@ -1405,9 +1405,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