summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2024-02-06 10:56:26 +0100
committerChristian Brabandt <cb@256bit.org>2024-02-06 10:56:26 +0100
commitf7f33e3719c87279dfad109b874e2817007a1184 (patch)
treebf6f9f3fa629cc51fdd7cba3e5eb942142e469e3 /runtime/doc
parentb1457d4cb9185b2b8d575b7736eff6d3a97d89eb (diff)
runtime(dosbatch): improve '::' comment highlighting
Added a syntax region for command blocks so that the highlighting of `::` comments in them can be controlled. The `dosbatch_colons_comment` variable now controls if all `::` comments in a code block are highlighted as comments or errors. A `::` comment at the end of a command block is always highlighted as an error. This re-enables the highlighting of `::` comments in `.bat` files as requested in #13666, while allowing control of highlighting them in command blocks requested in #11778 and first attempted in #11980. related: #11980 fixes: #13666 Co-authored-by: Mike Williams <mikew@globalgraphics.com> Signed-off-by: Mike Williams <mikew@globalgraphics.com> Signed-off-by: mevanlc <mevanlc@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/syntax.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 1c9f6f2b58..83285dd28b 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2024 Feb 05
+*syntax.txt* For Vim version 9.1. Last change: 2024 Feb 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1331,12 +1331,15 @@ Stack Overflow -
https://stackoverflow.com/questions/12407800/which-comment-style-should-i-use-in-batch-files
-To allow the use of the :: idiom for comments in the Windows Command
-Interpreter or working with MS-DOS bat files, set the
-dosbatch_colons_comment variable to anything: >
+To allow the use of the :: idiom for comments in command blocks with the
+Windows Command Interpreter set the dosbatch_colons_comment variable to
+anything: >
:let dosbatch_colons_comment = 1
+If this variable is set then a :: comment that is the last line in a command
+block will be highlighted as an error.
+
There is an option that covers whether *.btm files should be detected as type
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
is used by default. You may select the former with the following line: >