These instructions are for OS X, but the same general method applies to any platform.
Go to Sublime Text -> Preferences -> Browse Packages... to open the Packages folder ( ~/Library/Application Support/Sublime Text 3/Packages ). Create a new folder in Packages named Groovy . Then create a new file in Sublime with XML syntax and the following contents:
<?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>Comments</string> <key>scope</key> <string>source.groovy</string> <key>settings</key> <dict> <key>shellVariables</key> <array> <dict> <key>name</key> <string>TM_COMMENT_START</string> <key>value</key> <string>// </string> </dict> </array> </dict> <key>uuid</key> <string>D3A56263-A730-4C6E-B8F2-E65FEE21870B</string> </dict> </plist>
Save this file as Packages/Groovy/Comments.tmPreferences . You may receive a warning about saving a file with the suffix .xml , just ignore it and use .tmPreferences .
And now you can press ⌘ / and insert comments.
MattDMo
source share