Vim auto align XML

There is a simple one-liner which will automatically align the XML file.

Just type following command after opening the XML file with vim editor

:%!xmllint --format %


Now you see the auto aligned xml.

By Sandeep Posted in vim

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s