Bangash Bangash - 1 year ago 68
HTML Question

Emmet closing div's comment should come at the same line, how?

When I type

and press tab, I need the result as;

<div class="container">

</div> <!-- /.container -->

Not as;

<div class="container">

<!-- /.container -->

Is there any way to change this behavior ? (I'm using Emmet inside brackets), I need the closing div's comment at the same line as the closing tag, not at the new line, because sometimes accidentally I add more content in between the closing div tag and the comment.

Answer Source

Add the following to your Emmet User settings in Sublime Text (menu option Preferences > Package Settings > Emmet > User - Settings):

  "preferences": {
    "filter.commentAfter": "<!-- /<%= attr(\"id\", \"#\") %><%= attr(\"class\", \".\") %> -->"


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download