Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto-indent after pressing `Enter` between tags

Please see the GIF below:

enter image description here

I am using Visual Studio Code. By pressing Enter and Ctrl + Shift + Enter. I can make the auto indent in the next line.

So, I guess there is a more convenient way or package which can accomplish that by just pressing Enter.

like image 491
xianshenglu Avatar asked May 25 '18 07:05

xianshenglu


2 Answers

I resolved this problem by switching Language Mode from Django HTML (for some reason it was auto detected) to HTML.

  1. Press Ctrl+Shift+P (or directly press Ctrl+K, M => Select HTML)
  2. Print 'Change language mode' and press Enter
  3. Select HTML
like image 122
romanevg Avatar answered Sep 21 '22 02:09

romanevg


In preference->editor search for autoIndent and make it full

enter image description here

like image 33
Slimane amiar Avatar answered Sep 24 '22 02:09

Slimane amiar