1

I copy-pasted a batch file script from this SuperUser answer into Sublime Text 3, and had the following red line appear:

enter image description here

After some research and experimentation, this behaviour seems to be triggered by open quotes. Adding a " to the end of Line 6 gets rid of the red line, and adding a " on a separate line elsewhere in the script triggers another red line immediately after it, confirming this.

However, this still leaves two issues.

  1. I've been writing batch files in Sublime for a long time with this setup, so why has this behaviour only now surfaced - and how can I get rid of it?

  2. I can see no open quotes on Line 6 that could have triggered the red line. Have I missed something, or is this a glitch?

Hashim Aziz
  • 13,835

1 Answers1

1

Sublime thinks the caret (^) is escaping the quotation marks next to it, so the line thinks you're short a matching ".

Note the slightly different colour in my editor:

enter image description here

Add & REM " to the end of the line, and it'll go away. FINDSTR doesn't use it as an escape, but other commands do.

Silas B
  • 330