# Reformat Code on Directory dialog

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

> **TL;DR**
> `Code | Reformat Code`
>
>
>
> `Ctrl+Alt+L` (Windows), `⌘ ⌥ L` (macOS), `⌘ ⌥ L` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ L` (macOS System Shortcuts), `Ctrl+Alt+L` (XWin), `Ctrl+Alt+L` (GNOME), `Alt+Shift+L` (KDE), `Ctrl+Alt+L` (Emacs), `Ctrl+Alt+L` (Sublime Text), `⌘ ⌥ L` (Sublime Text (macOS)), `Alt+Shift+F` (VSCode), `⌥ ⇧ F` (VSCode (macOS))

This dialog appears when you select a `Reformat Code` action on the directory.

| Item | Description |
| --- | --- |
|  Directory/Module   |  This is a read-only field that displays the name of the selected directory or module. |
| Options |    This area displays options for your code reformatting.       You can select from the following options:        * Include subdirectories select this checkbox to have source code from files in the nested directories reformatted. This checkbox only appears when the nested directories exist.    * Optimize imports select this checkbox to remove unused import statements from the code within the selected scope.    * Rearrange entries select this checkbox to reorder your source code entries.    * Cleanup code select this option to run the [code cleanup](resolving-problems.html#code-cleanup) inspections.    * Only changes uncommitted to VCS 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 option is available only for the files under version control.    |
| Filters |    This area displays options for the filters that you can apply to the code reformatting action.       You can select from the following options:        * Scope select this checkbox to choose, from the list, a scope to which you want to apply your reformatting options. If you want to configure a custom scope, click ![the Browse button](https://resources.jetbrains.com/help/img/idea/2026.3/app.general.ellipsis.svg) button to open the [Scopes](settings-scopes.html) dialog .    * File mask(s) select this checkbox to choose, from the list, file extensions to which you want to apply your reformatting options.    |
| Run | Click this button to start reformatting the source code within the specified scope.  |

## See also

### Procedures

[Reformat and rearrange code](reformat-and-rearrange-code.html)

### Reference

[Code Style](settings-code-style.html)

