Skip to content

Wrap align html attributes only when line reaches certain length #1262

Open
@asolopovas

Description

@asolopovas

Is it possible to only wrap html attributes when line reaches certain length of characters. The way it works in Phpstorm for example is that If I have something like this.

<div v-for="item in items" class="items">
    <p>{{item.name}}</p>
</div>

Phpstorm formatter does not wrap the attributes but if my code looks something like this

<div v-for="item in items" class="items" v-if="items.notEmpty()" :class="{active: isActive} :key="item.id">
    <p>{{item.name}}</p>
</div>

and line contains more then 100 characters then it will wrap the attributes and align them like so

<div v-for="item in items" 
     class="items" 
     v-if="items.notEmpty()" 
     :class="{active: isActive} 
     :key="item.id">
    <p>{{item.name}}</p>
</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions