Reformat code
How to reformat code
Reformat your file, or part of your file, at any time with ⌘⌥L (macOS) / Ctrl+Alt+L (Windows/Linux) according to your code style settings. To remove custom line breaks, reformat the file or code again.
Display the Reformat File dialog with ⌘⌥⇧L (macOS) / Ctrl+Alt+Shift+L (Windows/Linux). In this dialog, we can select the scope we want to apply; either the whole file, or only changes that haven't been committed to VCS yet.
We can select a piece of code and use ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) to open the Adjust code style settings dialog.