RubyMine 5.4.3 Web Help

File | Settings | Project Settings | Code Style - General

settings

RubyMine | Preferences | Code Style - General

settings

Use this page to configure line separator and indentation options for the various languages. On reformatting source code, RubyMine will apply the specified indentation behavior.

Line separators

ItemDescription
Line Separator (for new files)Use this drop-down list to specify which line separator is to be used in files created by RubyMine. 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 marginSelect this check box to ensure that edited text always fits in the specified right margin.

Default indent options

ItemDescription
Use tab character
  • If this check box is selected, tab characters are used:
    • On pressing the TabTabTabTabTabTabTabTabTabTabTabTabTab key
    • For indentation
    • For code reformatting
  • When the check box is cleared, RubyMine uses spaces instead of tabs.
Smart tabs
  • If this check box is selected, RubyMine 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 sizeIn this text box, specify the number of spaces included in a tab.
IndentIn 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: