Home > Clipboard Tools > Clipboard Tools – Paste Replace Word

Clipboard Tools – Paste Replace Word

December 27th, 2010

Once you have a word (identifier) on the clipboard, you can easily replace any different word (identifier) with the one on the clipboard using Ctrl+B shortcut. The Paste Replace CodeRush action will select the word (identifier) at the caret before pasting in the contents of the clipboard, so you don’t have to select it first.

Here is an example. Consider that we have the Location property, which should be returning the default “Unknown” value, but currently it returns null. Let’s see how the Paste Replace Word feature will be useful here:

  1. Put the editor caret on the “Unknown” word
  2. Press Ctrl+C to copy it into the Clipboard, using another Smart Copy clipboard feature
  3. Put the editor caret on the “null” keyword
  4. Press Ctrl+B to replace the keyword:

CodeRush Paste Replace Word preview

—–
Products: CodeRush Pro, CodeRush Xpress
Versions: 10.1 and up
VS IDEs: any
Updated: Feb/02/2011
ID: C044

Similar Posts: