I'm using plugin Chiel92/vim-autoformat auto formatting xml files. So the default format program used for xml file is tidy
. The way it formats xml file is like below:
<List id='list' items='{/sss}' mode='{device>/listMode}' noDataText='{i18n>masterListNoDataText}' select='onSelect' growing='true' growingScrollToLoad='true'>
<items>
<ObjectListItem type='{device>/listItemType}' press='onSelect' title='{Name}' number='{ path: "Price", formatter: "exp.ind.cli.util.Formatter.currencyValue" }' numberUnit='USD'></ObjectListItem>
</items>
</List>
As you can see the attributes of the tags are on one line, and it can last very long even goes out of the screen. What I want is all the attributes to be formatted on separate lines( vertically aligned ).
<List id='list'
items='{/sss}'
mode='{device>/listMode}'
noDataText='{i18n>masterListNoDataText}'
select='onSelect'
growing='true'
growingScrollToLoad='true'>
<items>
<ObjectListItem type='{device>/listItemType}'
press='onSelect'
title='{Name}'
number='{ path: "Price", formatter: "exp.ind.cli.util.Formatter.currencyValue" }'
numberUnit='USD'>
</ObjectListItem>
</items>
</List>
I think it makes easier to spot the attributes and improve the readability of the xml file. Is there any way to achieve this?
:!<external command>
or with:help 'formatprg'
or:help equalprg
.