I have created a .tmLanuage file for a custom language in Sublime Text. Everything is working well, except that I can't seem to get automatic commenting to work. I can't seem to find anything in the Sublime Text docs or on Google about how to do this, but perhaps this is because I am not using the right keywords.
Let me explain what I mean. Let's say I have the following C code:
int i = 1;
i += 2;
If I highlight this in Sublime Text and press ctrl+/
, it gets changed to
// int i = 1;
// i += 2;
Similarly, for Python code:
i = 1
i += 2
would become
# i = 1
# i += 2
Clearly Sublime Text has to know about the language syntax in order to choose the proper comment character, which is why I assume I need to add something to my .tmLanguage file to get this to work. I took a look through the C.tmLanguage and Python.tmLanguage files that come with Sublime Text, and nothing jumped out at me as being the code that does this automatic commenting.
What do I have to add to my .tmLanguage file to enable this feature within Sublime Text? Or, is there some other file I must add/modify to enable this feature?