Vim Tips Wiki
No edit summary
 
Minimo (talk | contribs)
No edit summary
Line 1: Line 1:
{{review}}
 
 
{{Tip
 
{{Tip
 
|id=490
 
|id=490
Line 9: Line 8:
 
|rating=84/30
 
|rating=84/30
 
|text=
 
|text=
To paste something into a search or the colon command-line without using the system clipboard, press Ctrl-R" (including the quote, which represents the unnamed register), or replace the quote with another register. For more information about registers, see ":help resisters".
 
}}
 
   
 
To paste the contents of the unnamed register into the search or the colon command-line, press <C-R>" (including the quote, which represents the unnamed register), or replace the quote with the name of another register.
== Comments ==
 
The correct help command is "[http://vimplugin.sf.net/cgi-bin/help?tag={{urlencode:registers}} :help registers]", not ":help resisters".
 
   
 
Use <C-R><C-W> to paste the word under the cursor into colon commands.
This correction aside, this is an excellent tip!
 
   
  +
[[category:usage]]
japaget--AT--ix.netcom.com
 
, June 20, 2003 22:59
 
----
 
This is a great practice. I also use <C-R><C-W> to paster the world under the cursor into colon commands.
 
   
 
}}
Using this I've mapped lots of functions like:
 
:!echo <C-R><C-W> | aspell -a<CR>
 
:!grep -rHinE <C-R><C-W> .<CR>
 
 
 
RichardBronosky (first--AT--last.com)
 
, June 5, 2006 12:54
 
----
 
<!-- parsed by vimtips.py in 0.509873 seconds-->
 

Revision as of 14:41, 29 July 2007

Previous TipNext Tip

Tip: #490 - Paste registers in search or colon commands instead of using the clipboard

Created: June 20, 2003 8:30 Complexity: intermediate Author: rainbrot Version: 5.7 Karma: 84/30 Imported from: Tip#490

To paste the contents of the unnamed register into the search or the colon command-line, press <C-R>" (including the quote, which represents the unnamed register), or replace the quote with the name of another register.

Use <C-R><C-W> to paste the word under the cursor into colon commands.