File | Settings | Code Style

Use this dialog box to customize the code style at the global level, or at the project level. Settings at the global level are automatically applied every time IntelliJ IDEA generates, refactors, or reformats your code.

Settings at the project level apply to the current project only.

ItemDescription
Use per project settingsSelect this option to use your own code style settings configurable at the level of the current project.
ExportClick this button to save the current scheme under the specified name in the config\codeStyles folder under the IntelliJ IDEA home directory. This button is enabled, when the option Use per project settings is selected.
Use global settingsSelect this option to use global code style options for the project.
Scheme nameFrom this drop-down list, select the desired scheme.
Save asClick this button to save the current global scheme with a new name.
DeleteClick this button to delete the current scheme.
The default scheme cannot be deleted!
Copy to ProjectClick this button to create a copy of the current global scheme to the project level. After creating the copy, IntelliJ IDEA suggests to switch to this new scheme at the project level.

IntelliJ IDEA makes it possible to configure the following code styles:

The Preview section for each language immediately shows results when you change settings.

See Also

Concepts:

Procedures:

Web Resources: