Skip to main content

CodeRush Shortcuts

  • 7 minutes to read

The following tables show the default shortcuts for the main CodeRush features:

Clipboard

Feature Shortcut Description Context
Clipboard History Ctrl+Shift+V Invokes the Clipboard History window if the clipboard contains at least two different text fragments. Otherwise, pastes text from the clipboard. The editor is focused.
Smart Copy Ctrl+C or
Ctrl+Insert
Selects the code block based on the caret position and adds the selected code block to the clipboard. No selection, the caret is on token.
Smart Cut Ctrl+X or
Shift+Delete
Deletes the code block based on the caret position and adds it to the clipboard. No selection, the caret is on token.

Define Selections

Feature Shortcut Description Context
Selection Expand Ctrl+W Increases the selection by logical code blocks. The editor is focused.
Selection Reduce Ctrl+Shift+W Reduces the selection by logical code blocks. The editor is focused.
Select CamelCase Left Alt+Shift+Left Selects the left part of words in camelCased and PascalCased identifiers. The editor is focused.
Select CamelCase Right Alt+Shift+Right Selects the right part of words in camelCased and PascalCased identifiers. The editor is focused.

Wrap Selections

You need to enable the shortcuts. Open the CodeRush Setup Wizard, find the “One-key Selection Embedding” page and check “Enable one-key Embedding shortcuts” option.

Feature Shortcut Description Context
Comment/Uncomment Slash (/) in C#, JavaScript, TypeScript, F#, XAML, XML, and CSS.
Apostrophe (‘) in Visual Basic, XAML, XML, and CSS.
Comments out the selected code or deletes comment delimiters Multi-line selection.
Block begin/end B Wraps multi-line selections in the C# brace block {}. Multi-line selection.
try/catch C Wraps multi-line selections in the try/catch block. Multi-line selection.
try/finally F Wraps multi-line selections in the try/finally block. Multi-line selection.
try/catch/finally T Wraps multi-line selections in the try/catch/finally block. Multi-line selection.
Parentheses Shift+0, Shift+9 Embeds the selection in parentheses. Any selection
Not Parentheses Shift+1 Embeds the selection into the parentheses and places the logical Not (! in C#/C++, Not in Visual Basic) before the parentheses. Any selection.
Region Ctrl+3 Embeds a selection between the #region and #endregion directives and selects the region name placeholder. Multi-line selection.

Code Generation and Refactoring

Feature Shortcut Description Context
Refactor/Declare Ctrl+` Invokes the Code Actions menu The editor is focused.
Expand Template Space or Tab Expands a template. The caret after template.
Cycle Scope Up Alt+Up Changes a member’s visibility modifier. In the member/type declaration
Cycle Scope Down Alt+Down Changes a member’s visibility modifier. In the member/type declaration.
Smart Duplicate Line/Selection Shift+Enter Duplicates a code line and inserts text fields into the duplicate. The editor is focused.
Camel Delete Left Alt+Backspace Deletes the camelCase word to the left of the caret. The caret is in the CamelCase token.
Camel Delete Right Alt+Delete Deletes the camelCase word to the right of the caret. The caret is in the CamelCase token.
Declare Class Caps+C Declares a class. The caret is on an undeclared class.
Declare Method Caps+M Declares a method. The caret is on an undeclared method.
Declare Property Caps+P Declares a property. The caret is on an undeclared property.
Declare Field Caps+F Declares a field. The caret is on an undeclared field.
Declare Local Caps+L Declares a local. The caret is on an undeclared local.
Declare Constant Caps+Q Declares a constant. The editor is on an undeclared constant.
Remove Redundant Code Caps+Delete Runs one of the code actions depending on the code context: Remove Block Delimiters, Remove All Redundant Block Delimiters, Remove Redundant Constructor, Remove Redundant Assignment, Remove Variable, and others. The caret is in a redundant type/type member.
Add New Code Caps+Insert Runs one of the following code providers depending on the code context: Add Parameter, Add Else Statement, Add Getter/Setter, Add Missing Constructors, Add to Interface, and Create Event Trigger. The caret is in a corresponding type member.
Toggle Code Caps+Space Runs one of the following code actions depending on the code context: Make Implicit/Explicit, Use Expression Body, Convert to/Decompose Initializer, Inline Temp, Conditional/Ternary/Coalescing, and other actions. The caret is in a corresponding type member.

Remove Redundant Code Actions

Press Caps+Delete to run one of the following code actions:

Toggle Code Actions

Press Caps+Space to run one of the following code actions:

Note

To use the Caps Lock as a modifier, enable Caps shortcut bindings in the Setup Wizard on the Caps as a Modifier page. To learn caps shortcuts and practice CodeRush features: select the CodeRush | Support | Open Learning CodeRush Solution menu item.

Feature Shortcut Description Context
Tab to Next Reference Tab Highlights the current identifier and all its references and navigates to the next reference. The caret is inside an identifier.
Tab to Previous Reference Shift+Tab Highlights the current identifier and all its references and navigates to the previous reference. The caret is inside an identifier.
Contextual Jump To Ctrl+Alt+Del Invokes the Jump to window. The editor is focused.
Jump to Symbol Ctrl+Shift+Q Invokes the Jump to Symbol window. The editor is focused.
Jump to File Ctrl+Alt+F Invokes the Jump to File window. Available anywhere.
Drop Marker Alt+Home Drops a marker. The editor is focused.
Collect Marker Escape or Alt+End Moves the caret to a marker and removes it. The editor has focus, the marker is dropped.
Swap Marker Alt+Shift+Home Drops a marker and collects the last dropped marker. The editor is focused, the marker is dropped.
Toggle Bookmark Ctrl+Left Alt+(1-6) Drops or removes a corresponding bookmark The editor is focused.
Go to Bookmark Left Alt+(1-6) Jumps to a corresponding bookmark. The editor is focused.
Toggle Next Bookmark Ctrl+Num+ Drops a corresponding bookmark. The editor is focused.
Go to Recent Bookmark Ctrl+Num- Jumps to the last bookmark and removes it. The editor is focused.
Camel Case Nav Left Alt+Left Moves the caret to the left part of words in camelCased and PascalCased identifiers. The caret is in the camelCase or PascalCased token.
Camel Case Nav Right Alt+Right Moves the caret to the right part of words in camelCased and PascalCased identifiers. The caret is in the camelCase or PascalCased token.
Smart Navigation Caps+Arrow Keys Navigates between adjacent methods, parameters, controls, and properties. The caret is on token.
Smart Navigation Select Caps+Shift+Arrow key Navigates between adjacent methods, parameters, controls, and properties, and selects them. The caret is on token.

Debugging

Feature Shortcut Description Context
Toggle Temporary Breakpoint Alt+F9 Turns the temporary breakpoint on or off at the specified line number in the active file. Debugging, the editor has focus.
Step Into Member Ctrl+Shift+F11 Skips unnecessary members while debugging and drills down into the member you choose. Debugging, the caret is in the member reference.
Show Expression Explorer Alt+Down Shows the values of expression parts in the Expression Explorer. Debugging, the caret is inside expression.
Toggle Debug Visualizer Ctrl+Alt+D Turns the Debug Visualizer on or off. Debugging, the editor is focused.
Refresh/Evaluate Expression Ctrl+R Forces execution of the expression with side effect in the sandbox. Debugging, the editor is focused.

Test Runner

Feature Shortcut Description Context
Run active test Ctrl+T,R Runs test cases at the caret (cursor) location. The caret is inside a test method.
Debug active test Ctrl+T,D Starts the debugging of a test case(s) at the caret (cursor) location. The caret is inside a test method.
Run all tests in file Ctrl+T,F Runs test cases located in the current source file. Inside a file containing a test class.
Repeat Last Test Run Ctrl+T,L Runs test case(s) that were previously executed or debugged. Available anywhere.
Show Unit Test Runner Ctrl+T,T Shows the Unit Test Runner tool window. Available anywhere.

You can also download CodeRush Cheat Sheet if you prefer to have a printable copy of CodeRush shortcuts.