runtime(vim): Update base syntax, fix :augroup error matching
Commit:
https://github.com/vim/vim/commit/e1e347475eea179e6b0bb9a91d82221ad29edc23
Author: Doug Kearns <[email protected]>
Date: Mon Nov 10 19:50:57 2025 +0000
runtime(vim): Update base syntax, fix :augroup error matching
Only terminate the :augroup END argument at whitespace, comments and
trailing bars.
closes: #18711
Signed-off-by: Doug Kearns <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/syntax/generator/vim.vim.base
b/runtime/syntax/generator/vim.vim.base
index dc523a259..7aae3055b 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 <[email protected]>
-" Last Change: 2025 Nov 08
+" Last Change: 2025 Nov 10
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -397,13 +397,13 @@ syn cluster vimAugroupList
contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen
" define
VimFolda syn region vimAugroup
- \ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+"
+ \
start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S"
\ matchgroup=vimAugroupKey
- \ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"
+ \ end="\<aug\%[roup]\ze\s\+[eE][nN][dD]\s*\%($\|[|"#]\)"
\ skipwhite nextgroup=vimAugroupEnd
\ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
- syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
+ syn match vimAugroupError
"\<aug\%[roup]\s\+[eE][nN][dD]\ze\s*\%($\|[|"#]\)"
endif
" TODO: Vim9 comment
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_01.dump
b/runtime/syntax/testdir/dumps/vim_ex_augroup_01.dump
index a65389726..37bc23dc5 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_augroup_01.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_01.dump
@@ -17,4 +17,4 @@
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&@1|\+0#0000001#ffff4012|||e|c|h|o|\||| +0#0000000#ffffff0|||
|a+0#af5f00255&|u|t|o|c|m|d|!| +0#0000000&||| |a+0#af5f00255&|u|g|r|o|u|p|
+0#0000000&|E|N|D| @30
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!|
+0#0000000&|\+0#0000001#ffff4012|||e|c|h|o|\||| +0#0000000#ffffff0@55
-@57|1|9|,|1| @9|3|0|%|
+@57|1|9|,|1| @9|2|5|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_02.dump
b/runtime/syntax/testdir/dumps/vim_ex_augroup_02.dump
index aac0399d3..1a311c4cf 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_augroup_02.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_02.dump
@@ -10,11 +10,11 @@
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!|
+0#0000000&|\+0#0000001#ffff4012|"|\||| +0#0000000#ffffff0@59
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |t|r|a|i|l|i|n|g| |b|a|r| |a|n|d|
|t|a|i|l| |c|o|m@1|e|n|t|s| +0#0000000&@40
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
|-+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&@1|f+0#0000001#ffff4012|o@1|"+0#0000e05#ffffff0|c|o|m@1|e|n|t|
+0#0000000&@52
-||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|!|
+0#0000000&@67
-||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|
+0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*+0#e000e06&|
+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@47
+||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|t|o|c|m|d|!|
+0#0000000&@62
+||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|t|o|c|m|d|
+0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*+0#e000e06&|
+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@42
||+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&|E|N|D|"+0#0000e05&|c|o|m@1|e|n|t| +0#0000000&@53
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
-|-+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&@1|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o|
+0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
-||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|!|
+0#0000000&@67
-@57|3|7|,|1| @9|7|2|%|
+@57|3|7|,|1| @9|5|9|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_03.dump
b/runtime/syntax/testdir/dumps/vim_ex_augroup_03.dump
index 2b9bb8b37..c5f527cc2 100644
--- a/runtime/syntax/testdir/dumps/vim_ex_augroup_03.dump
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_03.dump
@@ -1,20 +1,20 @@
-||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|!|
+0#0000000&@67
-||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|
+0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*+0#e000e06&|
+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@47
-||+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&|E|N|D|||e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@50
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|-+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&@1|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o|
+0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
+||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|t|o|c|m|d|!|
+0#0000000&@62
+||+0#0000e05#a8a8a8255| | +0#0000000#ffffff0@1|a+0#af5f00255&|u|t|o|c|m|d|
+0#0000000&|B+0#00e0003&|u|f|R|e|a|d| +0#0000000&|*+0#e000e06&|
+0#0000000&|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@42
+||+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&|E|N|D|||e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"|
+0#0000000&@50
+| +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!|
+0#0000000&|f+0#0000001#ffff4012|o@1|"+0#0000e05#ffffff0|c|o|m@1|e|n|t|
+0#0000000&@52
-| +0#0000e05#a8a8a8255@1>a+0#af5f00255#ffffff0|u|g|r|o|u|p|!|
+0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o|
+0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
+| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|!|
+0#0000000&|f+0#0000001#ffff4012|o@1||+0#0000000#ffffff0|e+0#af5f00255&|c|h|o|
+0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@49
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |l|i|s|t| |g|r|o|u|p|s| +0#0000000&@59
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&@65
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|||
|e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|F|o@1|"| +0#0000000&@52
| +0#0000e05#a8a8a8255@1|a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&|"+0#0000e05&| |c|o|m@1|e|n|t| +0#0000000&@55
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
-|~+0#4040ff13&| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-|~| @73
-| +0#0000000&@56|5@1|,|1| @9|B|o|t|
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+| +0#0000e05#a8a8a8255@1|"+0&#ffffff0| |g|r|o|u|p|s| |n|a|m|e|d| |E|N|D|*|
+0#0000000&@53
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+@57|5@1|,|0|-|1| @7|9|4|%|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump
b/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump
new file mode 100644
index 000000000..4f7fc3777
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_augroup_04.dump
@@ -0,0 +1,20 @@
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@72
+|-+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p|
+0#0000000&|e+0#0000001#ffff4012|n|d|i|n|g| +0#0000000#ffffff0@58
+||+0#0000e05#a8a8a8255| |a+0#af5f00255#ffffff0|u|g|r|o|u|p| +0#0000000&|E|N|D|
@61
+| +0#0000e05#a8a8a8255@1> +0#0000000#ffffff0@72
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|7|1|,|0|-|1| @7|B|o|t|
diff --git a/runtime/syntax/testdir/input/vim_ex_augroup.vim
b/runtime/syntax/testdir/input/vim_ex_augroup.vim
index f7022ecd8..3f43a7553 100644
--- a/runtime/syntax/testdir/input/vim_ex_augroup.vim
+++ b/runtime/syntax/testdir/input/vim_ex_augroup.vim
@@ -41,14 +41,16 @@ augroup \"\| | autocmd! | augroup END
augroup! \"\|
+" trailing bar and tail comments
+
augroup foo"comment
- au!
- au BufRead * echo "Foo"
+ autocmd!
+ autocmd BufRead * echo "Foo"
augroup END"comment
augroup foo|echo "Foo"
- au!
- au BufRead * echo "Foo"
+ autocmd!
+ autocmd BufRead * echo "Foo"
augroup END|echo "Foo"
augroup! foo"comment
@@ -56,7 +58,14 @@ augroup! foo|echo "Foo"
" list groups
+
augroup
augroup | echo "Foo"
augroup " comment
+
+" groups named END*
+
+augroup ending
+augroup END
+
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 3b6c80399..5e1185a2b 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 <[email protected]>
-" Last Change: 2025 Nov 08
+" Last Change: 2025 Nov 10
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -451,13 +451,13 @@ syn cluster vimAugroupList
contains=@vimCmdList,vimFilter,@vimFunc,vimLineCommen
" define
VimFolda syn region vimAugroup
- \ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+"
+ \
start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S"
\ matchgroup=vimAugroupKey
- \ end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>"
+ \ end="\<aug\%[roup]\ze\s\+[eE][nN][dD]\s*\%($\|[|"#]\)"
\ skipwhite nextgroup=vimAugroupEnd
\ contains=vimAutocmd,@vimAugroupList,vimAugroupkey
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror")
- syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>"
+ syn match vimAugroupError
"\<aug\%[roup]\s\+[eE][nN][dD]\ze\s*\%($\|[|"#]\)"
endif
" TODO: Vim9 comment
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1vJWP8-001DDk-Bg%40256bit.org.