I can't get <a></a> tags in new lines when using emmet in VS code

Viewed 1407

enter image description here

When I enter a*5, I expected to get five tags in new lines. However, the five tags I got were in the same line like this.

enter image description here

How should I change my settings in VScode in order to have five tags in new lines?

enter image description here

2 Answers

It look like you need this in your settings:

"emmet.syntaxProfiles": {

  "html": {
    "inline_break": 1
  },
},

That will put all tags, including span and other typically inline tags, on their own line. There is no way to restrict it to a tags.

I thought "tag_nl" : true would work but it didn't.

See emmet syntaxProfiles.

Go to File> Preferences > Settings or you can use shortcut (Ctrl +,) You'll see Extensions> Emmet > scroll down and you'll find Preferences. Click Edit in settings.json Use the code from below:

"emmet.syntaxProfiles": {

  "html": {
    "inline_break": 1
  },
}
Related