runtime(vim): Update base-syntax, bug fixes

- Allow trailing backslashes in option values.
- Match :map-special modifier.
- Match :map-arguments case-sensitively.
- Remove <*Leader> from map modifier list and allow in RHS of a mapping.

closes: #16822

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2025-03-07 18:49:11 +01:00
committed by Christian Brabandt
parent 4a1e6dacbb
commit 6bdfeb099a
17 changed files with 195 additions and 141 deletions

View File

@ -5,6 +5,20 @@ map! lhs rhs
map
map lhs rhs
map <buffer><expr><nowait><script><silent><special><unique> lhs rhs
map <buffer> <expr> <nowait> <script> <silent> <special> <unique> lhs rhs
" :map special arguments are case sensitive, <BUFFER> is the LHS
map <BUFFER> rhs
map <Leader>lhs rhs
map <LocalLeader>lhs rhs
map lhs <Leader>rhs
map lhs <LocalLeader>rhs
map lhs <Plug>rhs
mapclear <buffer>
mapclear! <buffer>
nmapclear <buffer>
@ -32,10 +46,10 @@ map lhs :search('foo\\|bar')<CR>:echo "rhs"<CR>
" multiline RHS
map <leader>baz
\ :echo (<bar>
map <Leader>baz
\ :echo (<Bar>
\
\'bar')<cr>
\'bar')<CR>
"\ comment
map lhs
@ -89,14 +103,14 @@ enddef
" Issue #12672
nnoremap <leader>foo :echo call(
nnoremap <Leader>foo :echo call(
"\ comment
\ {x->x},
\ ['foo'])<cr>
\ ['foo'])<CR>
nnoremap <leader>bar :echo (
nnoremap <Leader>bar :echo (
\
\ 'bar')<cr>
\ 'bar')<CR>
" Example:

View File

@ -99,3 +99,15 @@ CompilerSet makeprg=ant
CompilerSet errorformat=\ %#[%.%#]\ %#%f:%l:%v:%*\\d:%*\\d:\ %t%[%^:]%#:%m,
\%A\ %#[%.%#]\ %f:%l:\ %m,%-Z\ %#[%.%#]\ %p^,%C\ %#[%.%#]\ %#%m
" Unreported issue (double backslash)
setlocal com=s1:/*,mb:*,ex:*/,b:--,be:\\
echo "Foo"
setlocal include=^\\s*\\%(so\\%[urce]\\\|ru\\%[ntime]\\)[!\ ]\ *\\zs[^\\|]*
echo "Foo"
set quoteescape=\\
echo "Foo"
set quoteescape=\
echo "Foo"