I'm appending text to "a" register with:"AyW
.
If I wanted to repeat last change I would use:.
But in this case I would like to repeat the last yank command.
Is there a command to repeat the last yank (append)? or should I use q
to record a macro instead?
1 Answer
If you include the flag y
in the cpoptions
option;
set cpoptions+=y
then yanks may be repeated using .
. See :help cpo-y
:
*cpo-y*
y A yank command can be redone with ".".
-
3Wow, I started writing up a really long hacky vimscript answer, but this is so much better. +1 Commented Jan 3, 2019 at 15:31