CLion 2018.2 Help

Reformat File Dialog

Ctrl+Shift+Alt+L


The dialog appears when you press Ctrl+Shift+Alt+L in the editor of the current file. If you choose Code | Reformat Code on the main menu or press Ctrl+Alt+L, CLion tries to reformat the source code of the specified scope automatically.

Item

Description

Only VCS changed text

If this checkbox is selected, then reformatting will apply only to the files that have been changed locally, but not yet checked in to the repository.
This checkbox is only available for the files under version control.

Selected text

Choose this option to have the currently selected fragment of source code reformatted.

Whole file

Choose this option to have all the source code in the current file reformatted.

Optimize imports

Select this checkbox to remove unused import statements from the code within the selected scope.

Last modified: 27 November 2018

See Also