Smart Cut & Copy
- 2 minutes to read
Smart Cut & Copy places logical code blocks on the clipboard with a single keystroke.
How to Use
Position the caret at the start or end of the code block and hit the cut shortcut (for example, Ctrl+X, Shift+Delete) or copy shortcut (Ctrl+C, Ctrl+Insert).
The following screencast demonstrates Smart Cut:
You do not need to select the code block if you want to copy it to the clipboard. After you press the copy shortcut, CodeRush pre-selects the code block based on the caret position and places it on the clipboard.
CodeRush allows you to cut or copy an identifier name. To do this, place the caret on the identifier name and press the copy or cut shortcut.
Note
If the caret is inside white space, the default Visual Studio cut or copy operation is applied (for example, cut/copy a code line).
How to Enable
The Smart Cut & Copy feature is disabled initially. To enable it, use one of the following ways:
Select CodeRush\Options… from the Visual Studio menu to open the options page and enable the Smart Cut & Copy option in the Quick Setup options page.
Select CodeRush\Options… from the Visual Studio menu, open the Editor | All Languages | Clipboard options page and enable the Smart Cut & Copy option.