- 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.
Open the CodeRush menu in Visual Studio and choose the Selection | Multi-Add menu item.
Repeat these actions with the next code part.
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.
If the caret is at the end of the line, CodeRush adds a single line.
The following screenshot shows Multi-Select in TypeScript:
You can perform the following actions with the selected text blocks:
|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.
Customize Default Shortcuts
You can change the default shortcuts that execute commands for the multi-select feature.