Hey guys, I’m trying to make a snippet to make it easier to create multiline comments in JavaScript following the standard:
/**
* foo
*/
I already have the following snippet, which is working:
[code]
<![CDATA[/**
- $0
*/]]> / source.js, source.actionscript.3
[/code]
The thing is that I want to know if I’m able to trigger the new line entries inside this comment block and replace it with *****. This way I’m able to write the multiline comment without worrying about the size of it.
In TextMate I have this working like a charm. I have two snippets:
https://dl.dropbox.com/u/3420025/Images/Misc/sublime-text-forum/multiline-comment-tm-1.png
https://dl.dropbox.com/u/3420025/Images/Misc/sublime-text-forum/multiline-comment-tm-2.png
Note that in the second one, which is responsible to add a new line to the comment has its source set to comment.block.documentation
. This is because TextMate let me set the snippet source as the comment block.
Is there any way to accomplish this with Sublime Text?