ReSharper 2016.1 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 options page.

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
Last modified: 19 August 2016