Sublime Forum

Batch File package missing toggle Comment.tmPreferences

#1

I noticed that the Batch File package is missing comment toggle functionality.

I recommend code such as the following be added in Comment.tmPreferences by default so that the user can toggle on and off commenting of lines in a batch file.

[code]<?xml version="1.0" encoding="UTF-8"?>

name Comment scope source.dosbatch settings shellVariables name TM_COMMENT_START value REM uuid 40910C79-A8F3-9854-6985-EC63AC6BBF2F [/code]
0 Likes

#2

Thank you!
Worked right away.

For newbies (like me), you should copy the above snippet into following location “%AppData%\Sublime Text 3\Packages\Batch file\Comment.tmPreferences”. If you don’t see Batch File directory (ST3 case), then install PackageResourceViewer package and use it to extract the Batch File package into that directory (in ST3, installed packages are packed and located elsewhere by default).

Also, if you prefer “::” for comments, simply replace "REM " with ":: " in line 17.

0 Likes