On this page:
Introduction
You can define the code styles that differ from the pre-defined ones. These code style schemes are stored in XML
files, in the config/codestyles folder under the user home directory.
You can use the created copy for modifying code styles, and for export.
If you select a code style scheme other than Project, then this code style will be saved for a project. Thus you can assign a global (IDE) code style for each project.
Creating a copy of a code style scheme
- In the Code Style page, select the desired scheme from the drop-down list,
and click
. - From the drop-down list, select one of the following options:
- Copy to IDE - select this option to store the selected scheme in a global level.
IntelliJ IDEA saves the new code style with the specified name in the
config/codestyles/<code_style_name>.xmlfile under the IntelliJ IDEA home directory. - Copy to Project - select this option to store the selected scheme in a project level.
The selected code style is saved in the
.ideadirectory in the filecodeStyleSettings.xml. - Duplicate - select this option to simply make a copy of the selected scheme and store it in the same level.
- Copy to IDE - select this option to store the selected scheme in a global level.
- In the Scheme field, type the name of the new scheme and press Enter to save the changes.
- Apply changes.
Managing code style schemes
IntelliJ IDEA lets you modify existing names of code style schemes, export or import code style settings.- In the Code Style page, select the desired scheme from the drop-down list,
and click
. - From the drop-down list, select one of the following options:
- Rename - select this option to change the name of the selected scheme.
- Export - select this option to export your code style settings to the desired location.
- Import - select this option to import IntelliJ IDEA XML code style settings, JSCS config file, or Eclipse XML Profile.
- In the Scheme field, type the name of the new scheme and press Enter to save the changes.
- Apply changes.