Commit: runtime(dosbatch): Show %%i as an argument in syntax file

4 views
Skip to first unread message

Christian Brabandt

unread,
Aug 14, 2024, 4:15:55 PM8/14/24
to vim...@googlegroups.com
runtime(dosbatch): Show %%i as an argument in syntax file

Commit: https://github.com/vim/vim/commit/a1dc64956f36cb921d556910c5356bb6b91ba5b9
Author: Ken Takata <ken...@csc.jp>
Date: Wed Aug 14 21:57:35 2024 +0200

runtime(dosbatch): Show %%i as an argument in syntax file

Inside batch files, for-variables must be written as %%i, not %i.

closes: #15453

Signed-off-by: Ken Takata <ken...@csc.jp>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim
index 761fac0dc..0c3e99be3 100644
--- a/runtime/syntax/dosbatch.vim
+++ b/runtime/syntax/dosbatch.vim
@@ -75,7 +75,7 @@ syn match dosbatchSet "\s\h\w*[+-]\==\{-1}" contains=dosbatchIdentifier,dosbatc

" Args to bat files and for loops, etc
syn match dosbatchArgument "%\(\d\|\*\)"
-syn match dosbatchArgument "%[a-z]\>"
+syn match dosbatchArgument "%%[a-z]\>"
if dosbatch_cmdextversion == 1
syn match dosbatchArgument "%\~[fdpnxs]\+\(\($PATH:\)\=[a-z]\|\d\)\>"
else
Reply all
Reply to author
Forward
0 new messages