Sublime Forum

Auto Close Divs with class name comment?

#1

I am wondering if there is a way or a package that will help me with this. I do alot of html page building at the moment and I try to keep my code as neat as possible. One thing I always do is comment closing divs with the class they are closing. Is there any way to make this auto generate for me?

Example

<!-- I type this-->
<div class="classname"> 

<!-- When I type </ this div auto closes and generates -->
</div> 

<!-- What I would like it to generate is:  -->
</div> <!-- End classname -->
0 Likes

#2

Emmet does that with |c filter (you can set that to be on by default):

docs.emmet.io/filters/

0 Likes