'What command can structure and layout code in Atom?

I copied code and pasted it in Atom (text editor), but it is all wrapped and very unclear to understand now. I'm looking for a command that unwraps the code and structures it automatically, instead of manually adding tabs and spaces.

example of what I mean with wrapped text



Solution 1:[1]

I replaced all the ">" with "> \n", which makes it a bit more clear already, but still not perfect

Solution 2:[2]

Use Atom-Beautify. Here's their demo:

Before:

screenshot of Atom showing unformatted HTML

After:

screenshot of Atom showing nicely formatted HTML

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 miguel amant
Solution 2 wjandrea