<C-g>
and <C-t>
jump to the next and previous match, respectively.
Also, if the mouse is enabled, you can probably use it (opening the command line window first might be necessary: <C-f>
if already on :
, q:
otherwise). Opening the command-line window has some additional benefits, so is worth looking into.
However, if the replacement is difficult to remember, I’d consider this workflow:
- (Optional: find
yyy
and yank it into a register)
/xxx
until you’re happy with the search pattern
:s//yyy
or :s//<C-r>{reg}
(type CTRL-r literally, using the register you yanked yyy
into)
:
then up arrow or ctrl-p