How to find text with pulled text on vim?

Say I pulled the following word: Cheese . Now I want to find Cheese in a text document. I press the slash key (/) ... and this is where I end up. Is there any way to search for the word Yankee? Also, is there a way that you can use yanked words in wildcard (s: / yanked / beef / g)?

+43
vim
Jul 23 '10 at 4:10
source share
2 answers

The most recent yanked text will be stored in registers 0 and " (if the register was not defined explicitly, for example, "xy ).

Then you can paste the text of any of these registers in the last line (in search mode / or in last line mode :) with Ctrl - R X , where X is the register you want to insert.

For example:

/ Ctrl - R 0

Paste the contents of register 0 into the direct search command line template.

+72
Jul 23 '10 at 4:17
source share
  • delete text
  • press q / p Enter

q / : open your search history

p Enter : paste the search text on the command line and search

+17
Oct 29 '13 at 12:56 on
source share



All Articles