ReSharper 2016.2 Help

Applying Code Style Preferences

ReSharper | Edit | Apply Code Style
Ctrl+Alt+S
ReSharper_ApplyCodeStyle

ReSharper allows you to batch-apply the following code style preferences:

You can configure each of the preferences on the Code Editing | C# | Code Style page of ReSharper options.

To apply code styles for existing code

  1. Select the scope where you want to apply code style preferences:
    • Make a selection in the editor to apply code style preferences in the selection.
    • Set the caret anywhere in the file to apply code style preferences in the file.
    • Select one or more items in the Solution Explorer to apply code style preferences in files under these items and their child items.
  2. Press Ctrl+Alt+S or choose ReSharper | Edit | Apply Code Style in the main menu .

You can apply code style preferences in the current selection with the corresponding context action.

To apply code style preferences in the current selection

  1. In the editor, select a block of code where you want to apply code styles.
  2. Press Alt+Enter or click on the action indicator to the left of the caret to open the action list.
  3. Select ThemedIcon.CodeStyle.Screen.[Gray] Apply code style in the action list.

This feature is supported in the following languages/technologies:

C# VB.NET C++ HTML ASPX Razor JavaScript TypeScript CSS XML XAML RESX Build Scripts Protobuf JSON
Feature available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available Feature not available
Last modified: 15 December 2016