Js-beautify: Option to put HTML attributes on their own lines, aligned

Created on 8 Apr 2016  路  6Comments  路  Source: beautify-web/js-beautify

Suggest an option to put HTML attributes on their own lines, aligned with each other. For example, turn this:

<button id="start-signout" class="button button-full" ng-click="vm.signout()" click-animation translate>AUTH.SIGN_OUT</button>

into this:

<button id="start-signout"
        class="button button-full"
        ng-click="vm.signout()"
        click-animation
        translate>AUTH.SIGN_OUT</button>

This has been requested and up-voted in a dependent product, Visual Studio Code.

enhancement

Most helpful comment

VSCode 1.23.1
"html.format.wrapAttributes": "force-aligned"
Not working in Vue SFC templates

All 6 comments

+1

Fixed by @Lukinos. Thanks!

Great work!

Is there an ETA for the 1.6.5 release? I would really like to see the force-align feature get into vscode!

vscode 1.23.1
"html.format.wrapAttributes": "force-aligned",
not works

VSCode 1.23.1
"html.format.wrapAttributes": "force-aligned"
Not working in Vue SFC templates

It would be nice if we could bind this "html.format.wrapAttributes" command to a keyboard shorcut.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gabrielmaldi picture gabrielmaldi  路  3Comments

retan picture retan  路  3Comments

jsejcksn picture jsejcksn  路  4Comments

geakstr picture geakstr  路  3Comments

mubaidr picture mubaidr  路  6Comments