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 specify general code formatting rules that apply for all languages.
The options that you configure on this page apply in the following cases:
To configure auto-formatting of new code, use the Auto-format on semicolon and Auto-format on closing brace options on the Environment | Editor | Editor Behavior page of ReSharper options.
How to indent multi-language files
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.
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.