How to reformat XML


#1

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
Search
Set Regex On
Search: >, Replace >\n (slow)
Select All
Editor: Auto Indent

Is there a way to do this automatically?


#2

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


#3

Awesome, works great thanks!