[PATCH] runtime: syntax: vim: fix for end with space

7 views
Skip to first unread message

Felipe Contreras

unread,
Dec 5, 2020, 8:44:13 PM12/5/20
to vim...@vim.org, Charles Campbell, Felipe Contreras
A backslash followed by a character can be part of the end of a set
command.

Currently this doesn't match:

"set fillchars+=vert:\ "

But it should. Removing the skip makes it work.

Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---
runtime/syntax/vim.vim | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 675c79503..8583eceef 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -380,7 +380,7 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'

" Set command and associated set-options (vimOptions) with comment {{{2
-syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
+syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vim9Comment,vimSetString,vimSetMod
syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline
syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
--
2.29.2

Reply all
Reply to author
Forward
0 new messages