I’m realizing more each day what a wonderful product Sublime Text 3 is. If jump-to-matching bracket, multiple selection and Markdown support weren’t enough, I came across this little gem today: Line Reindent.
It’s a pretty simple feature, but it saves me time and headache. So, what does it do? It reformats (i.e. reindents) that messy code you worked on a 2 a.m. into clean, perfectly indented lines of code.
How does it work? Although, there are some fantastic plugins available for Sublime Text, there’s none needed for this operation. Just select all of the lines with Ctrl + A, then select Edit>Line>Reindent from the menu.
That’s it! How cool is that?!