All docs
V21.1
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

How to: Repeat Last Refactoring

Follow the steps below to run the last refactoring executed in the session without invoking the Code Actions menu:

  • Choose CodeRush | Shortcuts… from the Visual Studio menu to open the Shortcuts configuration page.

    Config_Shortcuts_Access

  • Click New Shortcut to create a new shortcut.

    Config_Shortcuts_New

  • Configure the shortcut: specify a required shortcut in the “First shortcut” field, choose the RepeatLastRefactoring command from the list, and enable this shortcut.

    Config_Shortcuts_New

  • Click OK to apply the changes and close the Shortcuts options page.

  • Open the code editor and run a refactoring.

  • Place the caret in the code where you want to repeat refactoring or select it, and press Ctrl + 1.

The following screencast shows how the RepeatLastRefactoring command invokes the Initialize refactoring:

Config_Shortcuts_New

NOTE

If you have started a new Visual Studio session, the RepeatLastRefactoring command shows the Code Actions menu.