Let us say that I yanked the following word: Cheese. Now I want to find Cheese within a text document. I hit the forward slash key(/)... and this is where I end. Is there a way to search with Yanked word? Also, is there a way you can use yanked words in substitution(s:/yanked/beef/g)?
+11
A:
The most recently yanked text will be stored in the 0
and "
registers (if no register was explicitly specified e.g. by "xy
).
Then you can paste the text of any that register in the last line (either in search mode / or in last line command mode : ) with Ctrl-RX, where X
is the register you want to paste.
For example:
/Ctrl-R0
Will paste the contents of the register 0
in the forward search command pattern.
CMS
2010-07-23 04:17:36
Thank you, you've answered my question.
RoyalPie717
2010-07-23 06:57:33
@RoyalPie: You're welcome! and welcome to StackOverflow. A general practice if you're satisfied with an answer, is to mark it [as accepted](http://meta.stackoverflow.com/questions/5234/how-does-accepting-an-answer-work).
CMS
2010-07-23 07:11:54