Commit: runtime(vim): Update base syntax, match Vim9 lambda arg to :defer

0 views
Skip to first unread message

Christian Brabandt

unread,
Oct 28, 2025, 4:45:17 PMOct 28
to vim...@googlegroups.com
runtime(vim): Update base syntax, match Vim9 lambda arg to :defer

Commit: https://github.com/vim/vim/commit/433d2ab2066c0590e43f8396cd830a4ff62e8769
Author: Doug Kearns <dougk...@gmail.com>
Date: Tue Oct 28 20:36:04 2025 +0000

runtime(vim): Update base syntax, match Vim9 lambda arg to :defer

Support added in commit 21ef3c6e5972bbe8ab61195f98ccb85048b78985.

See: #18643
closes: #18645

Signed-off-by: Doug Kearns <dougk...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index 650f41613..40139de24 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougk...@gmail.com>
-" Last Change: 2025 Oct 22
+" Last Change: 2025 Oct 27
" Former Maintainer: Charles E. Campbell

" DO NOT CHANGE DIRECTLY.
@@ -318,7 +318,7 @@ syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount

" Defer {{{2
" =====
-syn match vimDefer "\<defer\=\>" skipwhite nextgroup=@vimFunc
+syn match vimDefer "\<defer\=\>" skipwhite nextgroup=@vimFunc,vim9LambdaParams

" Exception Handling {{{2
syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
diff --git a/runtime/syntax/testdir/dumps/vim_ex_defer_00.dump b/runtime/syntax/testdir/dumps/vim_ex_defer_00.dump
index c6856763f..d5a5f5f26 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_defer_00.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_defer_00.dump
@@ -10,11 +10,11 @@
|d+0#af5f00255&|e|f| +0#0000000&|B|a|r|(+0#e000e06&|)| +0#0000000&@65
@2|d+0#af5f00255&|e|f|e|r| +0#0000000&|d+0#00e0e07&|e|l|e|t|e|(+0#e000e06&|"+0#e000002&|t|m|p|f|i|l|e|"|)+0#e000e06&| +0#0000000&@49
@2|d+0#af5f00255&|e|f|e|r| +0#0000000&|D+0#0000001#ffff4012|e|l|e|t|e|(+0#e000e06#ffffff0|"+0#e000002&|t|m|p|f|i|l|e|"|)+0#e000e06&| +0#0000000&@49
+@2|d+0#af5f00255&|e|f|e|r| +0#0000000&|(+0#e000e06&|)| +0#0000000&|=+0#af5f00255&|>| +0#0000000&|{+0#e000e06&| +0#0000000&@59
+@4|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|.@2|"| +0#0000000&@60
+@2|}+0#e000e06&|(|)| +0#0000000&@69
|e+0#af5f00255&|n|d@1|e|f| +0#0000000&@68
@75
|~+0#4040ff13&| @73
|~| @73
-|~| @73
-|~| @73
-|~| @73
| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/input/vim_ex_defer.vim b/runtime/syntax/testdir/input/vim_ex_defer.vim
index 146237d7d..dd74f0c6e 100644
--- a/runtime/syntax/testdir/input/vim_ex_defer.vim
+++ b/runtime/syntax/testdir/input/vim_ex_defer.vim
@@ -10,5 +10,8 @@ endfunction
def Bar()
defer delete("tmpfile")
defer Delete("tmpfile")
+ defer () => {
+ echo "..."
+ }()
enddef

diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 2fcfc8dd7..19d2a8d50 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougk...@gmail.com>
-" Last Change: 2025 Oct 26
+" Last Change: 2025 Oct 27
" Former Maintainer: Charles E. Campbell

" DO NOT CHANGE DIRECTLY.
@@ -372,7 +372,7 @@ syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount

" Defer {{{2
" =====
-syn match vimDefer "\<defer\=\>" skipwhite nextgroup=@vimFunc
+syn match vimDefer "\<defer\=\>" skipwhite nextgroup=@vimFunc,vim9LambdaParams

" Exception Handling {{{2
syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
Reply all
Reply to author
Forward
0 new messages