Reputation: 21
I installed syntax highlighting for SML
in Sublime Text 2, however toggling comments
doesn't work.
Does Anyone know how to implement this functionality..?
Use case:
-> some text
-> (Cmd+/)
-> (* some text *)
Upvotes: 0
Views: 597
Reputation: 4119
I copied the Comments.tmPreferences
file from the Sass package I use and edited it. Copy the xml and save it in the same place you installed the sml package. The line <string>source.sml</string>
tells Sublime when to use this comment style, for files that have sml syntax. Edit as needed. The line TM_COMMENT_START
tells Sublime to put (*
at the start of the comment and similar for TM_COMMENT_END
. I commented out the uuid lines because I don't know what to put there and it seems to work without it. I did not test it on sml files, but worked on other syntaxes. I would recommend talking to the package developer to see if they would add a solution to their code.
<?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.sml</string>
<key>settings</key>
<dict>
<key>shellVariables</key>
<array>
<dict>
<key>name</key>
<string>TM_COMMENT_START</string>
<key>value</key>
<string>(* </string>
</dict>
<dict>
<key>name</key>
<string>TM_COMMENT_END</string>
<key>value</key>
<string> *)</string>
</dict>
</array>
</dict>
<!-- <key>uuid</key> -->
<!-- <string>7CDCE4E8-3850-4F98-A0A8-AFAE23F4F6E9</string> -->
</dict>
</plist>
Upvotes: 1