Sublime Forum

Syntax highlighting in BAT/CMD

#1

Hi,

in BATCH / BAT / CMD Syntax highlighting is a bug. If one put a special character inside a comment it get’s highlighted as a error. Example:

rem (This is) a comment | and some special chars

The braclets () and pipes | are highlighted as syntax error.

Where can I change this behaviour myself or can you include it in the next version?

Greetings.

0 Likes

#2
1 Like

#3

REM or rem is a legal comment (remark).

:: is a invalid jumping point / goto statement.

From SS64: “Double colons act like a GOTO or CALL :label the second colon is invalid as a name but is still treated as a label, and so the line is always skipped.”

0 Likes

#4

Invalid stuff like that is just ignored by the interpreter so why not scoping/using it as comment?

Not yet very perfect, but for those who can’t wait: https://github.com/deathaxe/sublime-packages/tree/pr/batch/rework/Batch%20File

2 Likes