Andylll03
Andylll03

Reputation: 83

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

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

Upvotes: 8

Views: 6975

Answers (3)

Alejandro
Alejandro

Reputation: 47

The accepted solution here didn't work for me, but I could solve with the solution posted here by Addem. It basically says, in the settings.json file (Ctrl + , > Extensions > Emmet > Preferences > Edit in "settings.json"), add this line:

    "emmet.preferences": {
    "output.inlineBreak": 1,
},

Upvotes: 2

khalilonline99
khalilonline99

Reputation: 121

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
  },
}

Upvotes: 0

Mark
Mark

Reputation: 180641

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.

Upvotes: 14

Related Questions