#566 Matching brackets highlighting in CMD/BAT scripts

Scintilla (793)

I have encountered a problem concerning the matching brackets highlighting in the Windows shell scripts (CMD/BAT files)

Let's assume a following simple script (it can be found as an example for using brackets on this URL - http://www.ss64.com/nt/if.html\):

IF EXIST filename (
del filename
) ELSE (
echo The file was not found.

When I paste this code into SciTE and save it as "TEST.CMD", then the very first bracket (the one on the first line) is not being correctly matched by highlighting with it's corresponding closing bracket. Instead, it seems that it is being highlighted as an external command.

If I remove the "exist" keyword from the others.properties file, the above shown problem goes away.


  • Neil Hodgson

    Neil Hodgson - 2007-05-27
    • labels: 101018 --> Scintilla
    • priority: 5 --> 2
    • assigned_to: nobody --> nyamatongwe
    • status: open --> open-accepted
  • Neil Hodgson

    Neil Hodgson - 2007-05-27

    Logged In: YES
    Originator: NO

    Looks like a valid bug. I don't work on Batch file bugs so there will only be a fix if someone contributes one.

  • Neil Hodgson

    Neil Hodgson - 2014-05-10

    The third brace is in the default style 0, not in style 5 like the other braces.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks