Sublime Forum

Define Comment type for new scopes

#1

Hi,

I defined some new scopes. When I comment something (cmd+/) in that scope it gets commented with which is no valid comment for that scope.
Is there any way to tell sublime to use // in that particular scope?

Thanks
A

0 Likes

#2

I don’t know much about syntax definition files, but I believe you create another Comments.tmPreferences file (call it Comments2.tmPreferences or whatever) and copy your second comment style into it with the “scope” key set to the scope where you want that alternate comment type to happen and change the TM_COMMENT_* values appropriately.

0 Likes