Sublime Forum

BAT/CMD syntax highlighting, seriously?

#1

People still use batch/cmd files and most other editors out there support it. I don’t see it included by default, and couldn’t find it on some of the links to conversions. Has anyone done this or know where to get it? I use batch quite a bit at work for simple tasks and this is actually one thing that’s preventing me from moving to Sublime.

0 Likes

#2

I’ll include a .tmLanguage file for .bat files in the next beta

0 Likes

#3

Thanks! Can you make sure it supports BAT and CMD? BAT is the DOS-variant of CMD (Windows batch files). Sorry for the “seriously?” comment, I was just kind of surprised to see it missing support for these.

0 Likes

#4

you can just change the last lines in …Application Data\Sublime Text\Packages\Batch File\Batch File.tmLanguage (latest beta has this file)

        <key>fileTypes</key>
        <array>
            <string>bat</string>
        </array>

to

        <key>fileTypes</key>
        <array>
            <string>bat</string>
            <string>cmd</string>
        </array>
0 Likes

#5

…and not to harp on it, but have you figured out why JSP syntax highlighting works fine in TextMate but not in Sublime? I tested that last week and it was the case. :frowning:

0 Likes

#6

Sublime Text is using an older version of Java.tmLanguage, that doesn’t work nicely when included from the JSP tmLanguage file… I’ll update it for the next beta.

0 Likes