Home Download Buy Blog Forum Support

Define Comment type for new scopes

Define Comment type for new scopes

Postby alvms on Wed Oct 30, 2013 9:01 pm

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
alvms
 
Posts: 26
Joined: Sun May 26, 2013 9:15 pm

Re: Define Comment type for new scopes

Postby sapphirehamster on Thu Oct 31, 2013 6:40 am

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.
sapphirehamster
 
Posts: 91
Joined: Sun Jul 01, 2012 11:19 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests