How to reformat XML


Often I paste an XML document in text into Atom (e.g. debugging).

When I do this, the XML is usually all displayed on one line.

To reformat I currently have to:

Set Language to XML
Set Regex On
Search: >, Replace >\n (slow)
Select All
Editor: Auto Indent

Is there a way to do this automatically?


There’s the atom-beautify package. You’ll still have to set the language to XML though I think.


Awesome, works great thanks!