AppCode 2023.1 Help

Code Style. CocoaPods

Use this page to configure formatting options for CocoaPods pod files. When you change these settings, the Preview pane shows how this will affect your code.

Tabs and Indents

Item

Description

Use tab character

  • If this checkbox is selected, tab characters are used:

    • On pressing the Tab key

    • For indentation

    • For code reformatting

  • When the checkbox is cleared, AppCode uses spaces instead of tabs.

Smart tabs

  • If this checkbox is selected, the part of indentation defined by the nesting of code blocks, is made of the tabs and (if necessary) spaces, while the part of indentation defined by the alignment is made only of spaces.

  • If this checkbox is cleared, only tabs are used. This means that a group of spaces that fits the specified tab size is automatically replaced with a tab, which may result in breaking fine alignment.

The Smart tabs checkbox is available if the Use tab character checkbox is selected.

Tab size

In this field, specify the number of spaces included in a tab.

Indent

In this field, specify the number of spaces to be inserted for each indent level.

Continuation indent

In this field, specify the number of spaces to be inserted between the elements of an array, in expressions, method declarations and method calls.

Other

Item

Description

Keep line breaks

Select this checkbox to have AppCode honor line breaks when reviewing pod files in the editor.

Align multiline list items

If this checkbox is selected, a list item starts at the same column on each next line. Otherwise, the position of a list item is determined by the current indentation level.

Align right parts of assignments or hashes

If this checkbox is selected, right parts of assignments or hashes are aligned.

Indent when cases

If this checkbox is selected, when is located at the corresponding indent level. Otherwise, when is placed at the same indent level with case.

Spaces around curly braces

If this checkbox is selected, spaces are inserted before and after each curly brace.

Spaces around arrows

If this checkbox is selected, spaces are inserted before and after each arrow.

Keep blank lines in declarations

In the text boxes in this area, specify the number of blank lines to be present in declarations.

Blank lines around methods

In the text boxes in this area, specify the number of blank lines to be inserted before and after each method.

Last modified: 20 January 2022