Quick tip: Sublime will reindent code for you and usually does a pretty good job.
You can find the option in the menu:
Edit → Line → Reindent.
You can add a custom key binding setup in the Sublime 2 menu:
Preferences → Key Bindings – User
Adding the following line to your user keybindings,
1 | {"keys": ["ctrl+shift+a"], "command": "reindent" , "args": {"single_line": false}} |
You can use Ctrl+Shift+a to make your code looks better.