PhpStorm 7.1.0 Web Help

File | Settings | Project Settings | Code Style - General

settings

Use this page to configure line separator and indentation options for the various languages. On reformatting source code, PhpStorm will apply the specified indentation behavior, and skip sections denoted with the special formatting off/on markers.

Line separators

Item Description
Line Separator (for new files) Use this drop-down list to specify which line separator is to be used in files created by PhpStorm. The available options are:
  • System dependent - choose this option to use the default selection.
  • Unix - choose this option to use the Unix line separator.
  • Windows - choose this option to use the Windows line separator.
  • Mac - choose this option to use the Mac line separator.

Refer to the section Configuring Line Separators.

Right Margin (columns) In this text box, specify the number of columns to be used to display pages in the editor.
Wrap when typing reaches right margin Select this check box to ensure that edited text always fits in the specified right margin.

Default indent options

Item Description
Use tab character
  • If this check box is selected, tab characters are used:
    • On pressing the TabTabTabTabTabTabTabTabTabTabTab key
    • For indentation
    • For code reformatting
  • When the check box is cleared, PhpStorm uses spaces instead of tabs.
Smart tabs
  • If this check box is selected, PhpStorm inserts tabs for indentation and reformatting, but fine alignment to a necessary column is done only via spaces without replacing them with tabs. This is done in order to preserve visual representation of the source code, when the Tab Size is changed.
  • If this check box 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 check box is available if the Use Tab Character check box is selected.

Tab size In this text box, specify the number of spaces included in a tab.
Indent In this text box, specify the number of spaces (or tabs if the Use Tab Character check box is selected) to be inserted for each indent level.

See Also

Procedures:

Reference:

Web Resources: