How to force a new line before every closing tag auto-generated in VSC?

Viewed 1104

So, I use Visual Studio Code, and I'm having some problems trying to get these settings to work as I want. I need indentation so I can code quick, as I move a lot of blocks all the time.

HTML tags are closed automatically as I code on VSC, but for some reason, it doesn't matter if I force or request the editor to format my code (it indents, break lines, etc), or if I hit save (VSC is set to auto-format when saving), it doesn't move the closing tags to a new line, although it preserves the indentation. So, instead of outputting, for.eg:

<tr>
 <td>
  <a>
   <img />
  </a>
 </td>
 <td>
  <a>
   <img />
  </a>
 </td>
</tr>

It outputs:

<tr>
 <td>
  <a>
   <img /></a></td>
 <td>
  <a>
   <img /></a></td>
</tr>

Is there anyway to force either VSC, Beautify or Emmet to generate the line break before every closing tags, either on save or on type?

0 Answers
Related