IntelliJ IDEA makes it possible to:

To change indentation of a text fragment, do one of the following
  • On the main menu, choose Edit | Indent Selection / Edit | Unindent Selection.
  • Press or or or Tab, or Tab, or / ⇧⇥ or ⇧⇥⇧⇥ or ⇧⇥⇧⇥ or ⇧⇥⇧ Tab, ⇧⇥ or ⇧⇥⇧ Tab, ⇧⇥ or ⇧⇥.
To fix indentation

Sometimes it is necessary to change indentation of a line at caret.

  1. Place the caret at a line with wrong indentation.
  2. Press ⌃⌥I or ⌃⌥I⌥⌘I or ⌥⌘I⌘I or ⌘I^ ⌥ I, ⌃⌥I or ⌃⌥I^ ⌥ I, ^ ⌥ Q, ⌃⌥I, ⌃⌥Q, ⌃⌥I or ⌃⌥Q.
To toggle between tabs and spaces
  • On the main menu, choose Edit | Convert Indents , and then choose To Spaces or To Tabs respectively.

See Also

Getting Started: