Home Download Buy Blog Forum Support

Batch File package missing toggle Comment.tmPreferences

Batch File package missing toggle Comment.tmPreferences

Postby robertcollier4 on Mon Mar 04, 2013 9:22 am

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: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>name</key>
   <string>Comment</string>
   <key>scope</key>
   <string>source.dosbatch</string>
   <key>settings</key>
   <dict>
      <key>shellVariables</key>
      <array>
         <dict>
            <key>name</key>
            <string>TM_COMMENT_START</string>
            <key>value</key>
            <string>REM </string>
         </dict>
      </array>
   </dict>
   <key>uuid</key>
   <string>40910C79-A8F3-9854-6985-EC63AC6BBF2F</string>
</dict>
</plist>
robertcollier4
 
Posts: 150
Joined: Sun Feb 24, 2013 5:37 pm

Re: Batch File package missing toggle Comment.tmPreferences

Postby nazikus on Sat Jun 06, 2015 11:31 am

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.
nazikus
 
Posts: 2
Joined: Fri Feb 01, 2013 5:17 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 8 guests