when renaming variables, you can search for it using / or * (reverse with ? or #) and use cgn (reverse cgN) to modify it, using . to change the next match.
The -gn movement is working on the next match. So you can spare one key (n or N) when bulk renaming variables.
tl;dr : Instead of
/foo<CR>ciwbar<ESC>n.n.n.
you can do:
/foo<CR>cgnbar<ESC>...
cheers 🍻
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
about your 1. there's another more awesome trick:
when renaming variables, you can search for it using
/
or*
(reverse with?
or#
) and usecgn
(reversecgN
) to modify it, using.
to change the next match.The
-gn
movement is working on the next match. So you can spare one key (n
orN
) when bulk renaming variables.tl;dr : Instead of
you can do:
cheers 🍻