Hi,
I've created a new language grammar -- with quite a bit of luck. Line comments start with a $ sign in this language, and there are no block comments. I've managed to get the regexp right for syntax highlighting of the comments, however when I C+/ to toggle a line as comment, it still uses C-style comments.
How do I convince textmate to use the correct line comment character?
Thanks in advance, Ozgur
On Feb 18, 2011, at 10:38 AM, Ozgur Akgun wrote:
How do I convince textmate to use the correct line comment character?
You could always create a new command scoped to your language that used the same shortcut, but I think there’s a better/more official way. (Someone correct me if I’m wrong.)
Create a new Preferences item in the bundle editor. I believe it should look like this:
{ shellVariables = ( { name = 'TM_COMMENT_START'; value = ‘$ '; }, ); }
And set the scope for the item to only match your new grammar.
This worked, thanks!
Just out of curiosity, how could I learned this by myself? Is there a reference about creating bundles? (Other than the online manual, which seems to be very limited)
Regards,