ReSharper 8.0 Web Help

ReSharper | Options | Code Editing | General Formatter Style


ReSharper's formatting options are configurable in a very flexible way and for each supported language separately. While this page provides a few general settings, the language-specific pages (Code Editing | [Language] | Formatting Style) allow you to fine-tune code formatting according to your coding standards and practices.

This page of ReSharper options allows you to define formatter options that apply for all languages.

Options in this page apply when ReSharper formats new or existing code (e.g., when you run code cleanup).


To configure auto-formatting of new code, use the Auto-format on semicolon and Auto-format on closing brace options in the ReSharper | Options | Environment | Editor | Editor Behavior.

Item Description
How to indent multi-language files These options define how to indent non-primary languages in a code file. For example, JavaScript in an HTML file.
  • Indent all languages equally using settings from main language (as Visual Studio does)
    When this option is selected, ReSharper uses similar indents for all additional languages.
  • Indent each language using its own settings (as ReSharper 7 and older did). When this option is selected, ReSharper uses indents defined for each language in the corresponding settings pages: Code Editing | [Language] | Formatting Style.
How to align when tabs are used for indents These options define whether to use tabs when aligning multiple constructs. For example, in the following code snippet, the parameters that otherwise may be on the same line are aligned by the first parameter.
    void foo(int firstParameter,
             int secondParameter)
The options apply only if usage of tabs (Keep tabs) is enabled in Visual Studio options (Tools | Options | Text Editor | All Languages | Tabs). Otherwise, spaces are always used for alignment.
  • Use spaces (recommended, looks aligned on any tab size)
    When this option is selected, ReSharper uses tabs for indents and spaces for alignment:
  • Only use tabs (inaccurate)
    When this option is selected, ReSharper uses tabs for both indents and alignment, which may not result in precise alignment:
  • Mix tabs and spaces for optimal fill
    When this option is selected, ReSharper uses tabs for both indents and alignment adds necessary spaces for precise alignment.


The first option is recommended because code aligned with second and third options may lose alignment when viewed in an editor with a different tab size.


ReSharper's settings are saved in settings layers that enable you to have different settings for different solutions as well as to share your settings with your team. To learn more, study the Managing and Sharing Options section.

See Also