Apologies I am probably expressing myself very badly, that's also why 1 hour searching hasn't yielded the result I wanted yet...
Assume I want to replace true
with false
in a buffer.
:s/true/false
Now, this is such a common word that I don't want to just change globally :%s/true/false/g
. I want to move the cursor (or search for the word), and every time I want to actually change, repeat the substitution.
So I can do then
:<up arrow to show again the substitution command><CR>
If I'd like to map this to a keyboard shortcut:
map <C-Y> :<WHAT TO PUT HERE?><CR>
?
I tried map <C-Y> :@<CR>
but that doesn't seem to be doing what I want.