Autoindent on Sublime Text

Thiago Anderson picture Thiago Anderson · Jun 28, 2017 · Viewed 66.1k times · Source

Are there any command/shortcut to auto-indent all my code on the page at once on Sublime Text 3?

e.g: On NetBeans I can do this with Alt+Shift+F.

Answer

Luan Gonçalves Barbosa picture Luan Gonçalves Barbosa · Jun 30, 2017

That's quite simple in Sublime. Just Ctrl+Shift+P (or Command+Shift+P on MacOS) to open the tools pallet, type reindent, and pick Indentation: Reindent Lines. It should reindent all the file you are in, just remember to save before running the command, or it may not appear.