Skip to main content

Mega Super Copy

  • 2 minutes to read

The Mega Super Copy feature allows you to add code with marked text elements to the clipboard. When you paste the code, CodeRush inserts linked text fields at the position of marked text elements. When you edit a text field, all other fields reflect the changes.

Typing_MegaSuperCopy

Note

You should mark only those text elements (code parts) that you want to change after you paste the code.

This feature is useful for repetitive code that needs a few changes. For example, you know which code parts you want to change, and where CodeRush should position the cursor after each paste.

How to Use

  1. Mark code parts that you want to change on paste.

    Select text in the code editor and press Ctrl+Alt+Enter to add text to the multi-selection. See the Multi-Select feature for more information.

  2. Select the code block (including multi-selection).

  3. Copy or cut the code block.

  4. Paste the code. CodeRush replaces multi-selected code elements with linked text fields.

After you insert the code, you can change these text fields in different code places at once.

Example

The following screencast demonstrates the Mega Super Copy feature:

MegaSuperCopy

Customization

You can configure how CodeRush generates links and fields on the Editor | All Languages | Linked Text & Fields options page.

MegaSuperCopy

Tips and Tricks

Specify Caret’s Position After Completion of Text Fields Edit Operation

  1. Put the caret at the place where you want the caret to be after you complete text fields edit operation.

  2. Press Ctrl+Alt+Enter to add a zero-length multi-selection marker at that location. When you paste, CodeRush places an empty Text Field at this location.

MegaSuperCopy

Paste Most Recent Mega-Super-Copied Text

Press Ctrl+Alt+V to paste the most recent Mega-Super-Copied text, even if it is not on the clipboard.

RecentCopy