In the latest version (at least), you can find it through:
- Settings (menu)
- Preferences...
- MISC (tab)
- lower-left checkbox list
- "Auto-indent" is the 2nd option in this group
[EDIT] Though, I don't think it's had the best implementation of Auto-indent. So, check to make sure you have version 5.1 -- auto-indent got an overhaul recently, so it auto-corrects your indenting.
Do also note that you're missing the block for the 2nd if
:
void main(){
if(){
if() { } # here
}
}