Enter the search pattern into the buffer somewhere, then yank / delete it in the register. Use ctrl-r + x at the search prompt (/) to get case x.
If you have already searched for a pattern, use :let @x=@/to assign it the register x.
Roger Pate
source
share