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 '.
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 '.
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.