-2

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!

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66
AC_DCEDH
  • 67
  • 1
  • 1
  • 6
  • 1
    Possible duplicate of [How to set HTML Auto Indent format on Sublime Text 3?](https://stackoverflow.com/questions/21190300/how-to-set-html-auto-indent-format-on-sublime-text-3) – HSchmale Oct 05 '18 at 13:57

2 Answers2

0

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.

AC_DCEDH
  • 67
  • 1
  • 1
  • 6
0

In Sublime 3: Command + Shift + P (or CTRL + Shift + P) and then type "Indent" and choose "Indentation: Reindent Lines".

It will automatically format for you.

aphoenix
  • 51
  • 4