From ee26b227e15abc263195d4c746d5dba9f0e6dec4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 21 Feb 2023 23:50:29 +0800 Subject: vim-patch:partial:938ae280c79b (#22356) Update runtime files. https://github.com/vim/vim/commit/938ae280c79b8cdb0fca60336ec4c090ecd8bb5a Partially skip autocmd.txt: needs patch 8.2.5011. Partially skip builtin.txt: needs patch 9.0.0411. Partially skip eval.txt: needs patch 8.2.3783. Cherry-pick :map-meta-keys from patch 9.0.1276. Co-authored-by: Bram Moolenaar --- runtime/syntax/dosbatch.vim | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'runtime/syntax/dosbatch.vim') diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim index f003a65909..a75771bd2d 100644 --- a/runtime/syntax/dosbatch.vim +++ b/runtime/syntax/dosbatch.vim @@ -1,12 +1,12 @@ " Vim syntax file -" Language: MS-DOS batch file (with NT command extensions) -" Maintainer: Mike Williams +" Language: MS-DOS/Windows batch file (with NT command extensions) +" Maintainer: Mike Williams " Filenames: *.bat -" Last Change: 6th September 2009 -" Web Page: http://www.eandem.co.uk/mrw/vim +" Last Change: 12th February 2023 " " Options Flags: " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] +" dosbatch_colons_comment - any value to treat :: as comment line " " quit when a syntax file was already loaded @@ -92,7 +92,11 @@ syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchS syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell -syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +if exists("dosbatch_colons_comment") + syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +else + syn match dosbatchError "\s*:\s*:.*$" +endif " Comments in ()'s - still to handle spaces before rem syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell @@ -110,34 +114,35 @@ syn keyword dosbatchImplicit vol xcopy " Define the default highlighting. " Only when an item doesn't have highlighting yet -hi def link dosbatchTodo Todo +hi def link dosbatchTodo Todo +hi def link dosbatchError Error hi def link dosbatchStatement Statement hi def link dosbatchCommands dosbatchStatement -hi def link dosbatchLabel Label +hi def link dosbatchLabel Label hi def link dosbatchConditional Conditional -hi def link dosbatchRepeat Repeat +hi def link dosbatchRepeat Repeat -hi def link dosbatchOperator Operator -hi def link dosbatchEchoOperator dosbatchOperator -hi def link dosbatchIfOperator dosbatchOperator +hi def link dosbatchOperator Operator +hi def link dosbatchEchoOperator dosbatchOperator +hi def link dosbatchIfOperator dosbatchOperator hi def link dosbatchArgument Identifier -hi def link dosbatchIdentifier Identifier +hi def link dosbatchIdentifier Identifier hi def link dosbatchVariable dosbatchIdentifier hi def link dosbatchSpecialChar SpecialChar -hi def link dosbatchString String -hi def link dosbatchNumber Number +hi def link dosbatchString String +hi def link dosbatchNumber Number hi def link dosbatchInteger dosbatchNumber hi def link dosbatchHex dosbatchNumber -hi def link dosbatchBinary dosbatchNumber -hi def link dosbatchOctal dosbatchNumber +hi def link dosbatchBinary dosbatchNumber +hi def link dosbatchOctal dosbatchNumber hi def link dosbatchComment Comment hi def link dosbatchImplicit Function -hi def link dosbatchSwitch Special +hi def link dosbatchSwitch Special hi def link dosbatchCmd PreProc -- cgit