Boykodev
Boykodev

Reputation: 920

Put each tag on a new line when wrapping with Emmet in PhpStorm

In PhpStorm 9.0 when wrapping a list of values, for example:

Item 1
Item 2
Item 3

With different abbreviations, for example:

p.$*

I have the input all in one line, like this:

<p class="1">Item 1</p><p class="2">Item 2</p><p class="3">Item 3</p>

How can I make tags appear on individual lines?

Upvotes: 5

Views: 3110

Answers (4)

drakanor
drakanor

Reputation: 129

Preferences > Editor > Emmet > HTML > "Filters enabled by default": disable "Single line" option

Upvotes: 0

vatavale
vatavale

Reputation: 1620

Also faketag>p* separate each line of <p>. And it's fast do delete faketag ater that.

Upvotes: 0

lena
lena

Reputation: 93728

Code is usually formatted according to specified code style settings when expanding Emmet abbreviations. If you like to have all tags placed on separate lines, make sure to remove this tag from both 'Inline elements' and 'Don't break if inline contents' lists in Settings/Editor/Code Style/HTML/Other

Upvotes: 1

Boykodev
Boykodev

Reputation: 920

I figured that only inline elements are stacking in a single line. "p" tag has this behavior due to this setting.

Upvotes: 4

Related Questions