I have the following string, where I want to change the number "merged_boris_20220712.boris"
. If instead of underscores it had dashes, I would just go to the numbers and do ciw
and type the new number, but underscore are part of word
so this doesn't work here. What would be an efficient solution here?
1 Answer
Either of f2ct.
or f2cw
should work (the latter assuming .
is not in iskeyword
). Depending on the edit, Ctrl-x and Ctrl-a are also options.
Another: /\d\+
Entercgn
. There is no binding for cd
, so you could do
:nnoremap cd /\d\+<enter>cgn
to make cd
change the next (whole) number.
f2ct.
orf2cw
should work (the latter assuming.
is not iniskeyword
). Do either work for you? Depending on the edit, C-x/C-a are optionsi
something so much :)_
and.
. I misunderstood. Never mind.