IntelliJ IDEA makes it possible to:
- Indent or unindent text. This action applies to a selection, or to a line at caret.
- Fix wrong indentation according to the code style.
- Choose tabs or spaces for indentation. This action applies to a selection, or the whole current file in the active editor.
- On the main menu, choose / .
- Press ⇥ or ⇥⇥ or ⇥⇥ or ⇥Tab, ⇥ or ⇥Tab, ⇥ or ⇥ / ⇧⇥ or ⇧⇥⇧⇥ or ⇧⇥⇧⇥ or ⇧⇥⇧ Tab, ⇧⇥ or ⇧⇥⇧ Tab, ⇧⇥ or ⇧⇥.
Sometimes it is necessary to change indentation of a line at caret.
- Place the caret at a line with wrong indentation.
- Press ⌃⌥I or ⌃⌥I⌥⌘I or ⌥⌘I⌘I or ⌘I^ ⌥ I, ⌃⌥I or ⌃⌥I^ ⌥ I, ^ ⌥ Q, ⌃⌥I, ⌃⌥Q, ⌃⌥I or ⌃⌥Q.