From 21a24117636c2b7d62c078a17f1a1182e23bdd1a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 8 Jun 2025 08:38:19 +0800 Subject: [PATCH] vim-patch:1cccdeb: runtime(vim): Update base-syntax, improve Vim9 block start pattern The opening curly brace must be followed by whitespace, comment or trailing bar. closes: vim/vim#17454 https://github.com/vim/vim/commit/1cccdebc0f20281daabce3bef0a5cec3a04ffd25 Co-authored-by: Doug Kearns --- runtime/syntax/vim.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index c2a253695c..2966dfd827 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -660,7 +660,12 @@ endif " Blocks: {{{2 " ====== -Vim9 syn region vim9Block matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList +Vim9 syn region vim9Block + \ matchgroup=vimSep + \ start="{\ze\s*\%($\|[#|]\)" + \ end="^\s*\zs}" + \ skipwhite nextgroup=vim9Comment,vimCmdSep + \ contains=@vimDefBodyList " Keymaps: {{{2 " =======