I find myself often repeating the following pattern of operations.
I usually go into visual mode, select some lines or block. Then I yank them using y
, and paste them using p
or P
. The next step is to select the pasted text, to replace a variable or function name or change indentation.
I know that I can use gv
to reselect the "origin" but what I would like is a similar command to select the "destination".
:help gv
mentions :
After using "p" or "P" in Visual mode the text that was put will be selected.
but it is only useful when you are replacing a selection by the content of register, not when you are inserting a whole new block.