AppCode 2016.3 Help

Copying Code Style Settings

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 code style for each project.

Creating a global copy of a code style scheme

To create a copy of code style settings

  1. In the Code Style page, select the desired scheme from the drop-down list, and click Manage.
  2. In the Code Style Schemes dialog box that opens, click Save As....
  3. In the Save Code Style Scheme As dialog box, type the name of the new scheme.

    AppCode saves the new code style with the specified name in the config/codestyles/<code_style_name>.xml file under the AppCode home directory.

  4. Close the Code Style Schemes dialog box, and apply changes.

Creating a project copy of a code style scheme

To copy code style settings to a current project

  1. In the Code Style page, select the desired scheme from the drop-down list, and click Manage.
  2. In the Code Style Schemes dialog box that opens, click Copy to Project:
    /help/img/idea/2016.3/AppCode_CodeStyleScheme1.png

    The selected code style is saved in the .idea directory in the file codeStyleSettings.xml.

  3. In the Copy Scheme to Project dialog box, confirm switching to the new scheme, if necessary (Yes):
    /help/img/idea/2016.3/AppCode_CodeStyleScheme2.png

    Then close the Code Style Schemes dialog box, and apply changes.

See Also

Last modified: 28 March 2017