I often find myself doing an interactive search and replace for a string that may be either a whole word or a partial word, such as changing bar
to jaz
and also foo_bar_blah
to foo_jaz_blah
.
So I can't just do cw
. But if I do for example c/_<CR>
then I've lost bar
as the search pattern. How can I change just the current instance of the search pattern and retain that search pattern?
c/_<cr>
is perhaps better writtenct_
.