commit e9d8d1b061e2adbb03259d9885591ed80594b8b1
parent 6b0365ae2f8b5e1d2b3e5e3a6a49c1d16d80ffa3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Mon, 29 Sep 2025 09:16:30 +0800
vim-patch:57d243e: runtime(vim): Update base syntax, fix indented Vim9 :redir highlighting
Include post operator whitespace in the Vim9 variable assignment
lookahead so that "redir =>" doesn't match as an assignment.
fixes: vim/vim#18319
closes: vim/vim#18323
https://github.com/vim/vim/commit/57d243e27da804489e256add0398efb9310a4353
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
@@ -259,9 +259,9 @@ syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimV
Vim9 syn match vimVar contained "\<\h\w*\ze<" nextgroup=vim9TypeArgs
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
-Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
-Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\==\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.=\%(\s\|$\)"
+Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<\s" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This