Sublime Text 3 is one of the most popular text editors across platforms. Although a boon for a developer, it lacks a default keyboard shortcut to reindent code automatically. But the good news is, you can create your own key binding for it.

For Mac OSX, Linux, and Windows users, the keybindings settings file can be found under the menu Preferences > Keybindings - User.

Add a JSON object that includes your key(s) and the Sublime Text command. The available key names are listed in the Sublime Text documentation (see the Key Names section).

The general pattern for your settings object looks like this:

[ { "keys": ["KEY(S)"], "command": "COMMAND"} ]

To add a shortcut for automatic indentation, add the following line to the Keybinding:

{"keys": ["command+shift+i"], "command": "reindent", "args": {"single_line": false}}

Voila! Press command + shift + i to automatically reindent your code!