Skip to main content
A newer version of this page is available. .

Multi-Select

  • 2 minutes to read

Multi-Select allows you to select multiple code parts simultaneously. To use this feature:

  • Choose code in the code editor.

  • Press Ctrl + Alt + Enter to select the code.

    or

    Open the CodeRush menu in Visual Studio and choose the Selection | Multi-Add menu item.

    MultiSelectMain

  • Repeat these actions with the next code part.

MultiSelectMain

If the caret is inside a code block (for example, in the if keyword), CodeRush selects the entire loop block after you press Ctrl + Alt + Enter.

MultiSelectMain

If the caret is at the end of the line, CodeRush adds a single line.

TypeScript/JavaScript Support

The following screenshot shows Multi-Select in TypeScript:

MultiSelectMain

Operations

You can perform the following actions with the selected text blocks:

Operation Shortcut
Copy the multi-selection contents and Clear the selection Ctrl + C
Cut the multi-selection contents Ctrl + X
Delete the multi-selection contents Backspace or Delete
Clear the selection Ctrl + Alt + Backspace
Restore the last multi-selection Ctrl + Alt + Shift + Backspace
Undo the last addition Ctrl + Alt + NumPad Minus
Redo the last operation Ctrl + Alt + NumPad Plus

When you press Ctrl+C to copy the multi-selection content, CodeRush clears the selection. To keep the selection, go to the Editor | All Languages | Selection options page and uncheck the “Deselect on Copy” option.

Delete

Customize Default Shortcuts

You can change the default shortcuts that execute commands for the multi-select feature.

Delete