How do I search for the selected (with v and y) string? I usually search with /, but I cannot paste the selected string after /.
How do I search for the selected (with v and y ) string? I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In insert mode you can use CTRL-R to insert the contents of Vim registers. By default, copied text gets put in the unnamed register
", so to insert that text you would type<C-R>"in insert mode. The search prompt uses Command-line mode which has its ownCTRL-R that works almost identically to the one in Insert mode.
So if I just yanked the text
foo, typing/<C-R>"would search for the textfooonce I press enter.