Tools -> Smart Indent

This enables/disables smart-indentation while you type.