Search code examples
sublimetext3atom-editorauto-indent

How can I auto indent in IDE with HTML that is all over the place? Sublime, Atom


I am editing old HTML files that have indentation that is just bizarre and unorganized. There are divs within divs within divs x 1000. I couldn't go in there and try to manually move them around because structurally it is a mess. Is there a way to auto indent everything so it looks neat and organized?

I have access to Sublime Text 3 and Atom IDE.

Thanks!


Solution

  • I found this:

    One option is to type [command] + [shift] + [p] (or the equivalent) and then type 'indentation'. The top result should be 'Indendtation: Reindent Lines'. Press [enter] and it will format the document.