aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/dosbatch.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-02-21 23:50:29 +0800
committerGitHub <noreply@github.com>2023-02-21 23:50:29 +0800
commitee26b227e15abc263195d4c746d5dba9f0e6dec4 (patch)
tree270e62c0fecf3f75f13fde49658daf1af181b492 /runtime/syntax/dosbatch.vim
parentd18f8d5c2d82b209093b2feaa8921a4792b71d59 (diff)
downloadrneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.tar.gz
rneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.tar.bz2
rneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.zip
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 <Bram@vim.org>
Diffstat (limited to 'runtime/syntax/dosbatch.vim')
-rw-r--r--runtime/syntax/dosbatch.vim39
1 files changed, 22 insertions, 17 deletions
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 <mrw@eandem.co.uk>
+" Language: MS-DOS/Windows batch file (with NT command extensions)
+" Maintainer: Mike Williams <mrmrdubya@gmail.com>
" 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