How do I reformat HTML code using Sublime Text 2? I've got some poorly-formatted HTML code that I'd like to reformat. Is there a command that will automatically reformat HTML code in Sublime Text 2 so it looks better and is easier to read? Answer: You don't need any plugins to do this. Just select all lines (CtrlA) and then from the menu select Edit → Line → Reindent. This will work if your file is saved with an extension that contains HTML