I would like to make comments like this in Sublime Text 2:
/********************
* This is a comment *
********************/
Is there an easy way to make those automatically?
Also, where can I find good documentation about such stuff. I love Sublime, but I feel it’s poorly documented!
You could create a snippet for doing this.
Go to
Tools->New Snippetand a new file is opened. Paste this in it:Save this in your
Packages\User-Folder (which should be set automatically when saving).Now you can just type
bigcom(as defined in the<tabTrigger>– element) and hittab. The comment will appear and the cursor is set at the position, where$0is set in the snippet.Additionaly, you could add a
scope– element inside the<snippet>-block, so this snippet will only work in a specific syntax scope, for example:Unfurtonately, I don’t know how you could add the
*-character on both sides of the line you are writing in automatically, when you jump into a new line, so I don’t know if this fits your needs. You would have to add those manually. Still I hope this helps in some way.Edit:
Found something for this in another question on stackoverflow. Have a look at this answer. When doing this, at least the
*character on the beginning of the new line is added. I’ll have a look if I can get it to add the character at the end of the line too.When it comes to the documentation, I agree, there’s not really a lot out there. Of course there is the official documentation: Sublime Doc and of course the forum: Sublime Forum (which is a good resource to some point, not like the poorly filled Doc). On the other hand I always recommend reading the post on net.tutsplus, which is a nice starting point.
I pretty much stumbled over the most interesting parts that come with the standard installation while browsing trough the
Global SettingsandKey Bindings-Files, which you can open over thePreferences– Menu