- On the main menu, choose , or press Ctrl+Alt+LCtrl+Alt+LAlt+Shift+LCtrl+Alt+LCtrl+Alt+LCtrl+Alt+LAlt+F8 or Ctrl+Alt+FAlt+Shift+FCtrl+Alt+L or Ctrl+Shift+FMeta Alt LMeta Alt LMeta Shift F.
- In the Reformat Code dialog box, specify the reformatting scope:
- The current file.
- Selected text.
- All files in the current directory, including or omitting subdirectories. You can also include optimizing imports, by checking the Optimize imports option, which is enabled for the current directory only.
- Click Run.

