Is there a way to save a search pattern to a register and then conjure it up with some quick command?
I’m thinking of the way vim uses named registers with q and @, and named marks with m and ‘.
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.
Enter the search pattern in a buffer somewhere, then yank/delete it into a register. Use ctrl-r+x, at the search prompt (/), to retrieve register x.
If you already searched for the pattern, use
:let @x=@/to assign it to register x.