DotJoshJohnson / vscode-xml

XML Tools for Visual Studio Code
MIT License
322 stars 86 forks source link

Support equivalent of html.format.wrapAttributes: force-aligned #214

Open kibiz0r opened 6 years ago

kibiz0r commented 6 years ago

Description What would you like to see added to XML Tools?

I would like XML Tools to support the same "wrap attributes" modes as the built-in HTML modes, but especially "force-aligned".

My team formats their XML like this:

<myThingy attr1="val1"
          attr2="val2"
          ...>

While "xmlTools.splitAttributesOnFormat" only supports indenting by your standard "indent" amount, rather than keeping the attributes aligned.

e.g.

<myThingy attr1="val1"
    attr2="val2"
    ...>

Current Workarounds Are you using a workaround in the meantime?

Right now, I'm just associating my XML files with the HTML filetype so that I can use the "force-aligned" mode. This is really awkward, because it means turning off all HTML suggestions/validations, and prohibits me from using other XML-associated tools.

johncrim commented 5 years ago

Big thumbs up for this idea, particularly in combination with #245 .

bobslee commented 3 months ago

+1