Reputation: 25
Is there any plugin out there that creates begin, end HTML comments automatically? Like the following.
<!-- begin #page -->
<div id="page">
<!-- begin #header -->
<div id="header">
</div>
<!-- end #header -->
</div>
<!-- end #page -->
I am tired of commenting these out.
Upvotes: 1
Views: 1085
Reputation: 12438
You may use this little snippet that I wrote:
<snippet>
<content><![CDATA[
<!-- .${1:className} -->
<div class="${1:className}">
${2}
</div>
<!-- /.${1:className} -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>divc</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
and save it in Sublime Text #\Packages\User\divc.sublime-snippet
When you are done, you can use divc
+tab
to generate the required snippet
Upvotes: 2
Reputation: 762
If you just want to comment something out, you can just select the content you want to comment and type ctrl + /
and it will do the trick.
Upvotes: -1
Reputation: 6521
Not that i know of but you can create a custom snippet and use it when you like. This will allow you to insert that text without typing it out each time.
For directions check this link: http://sublimetext.info/docs/en/extensibility/snippets.html
Upvotes: 1