I often want to copy a line and replace another line with the pasted copy. Is there a better way than Y
on source line, go to the line that has to be replaced and Pjdd
?
You can go to the source line, yank it with yy
or Y
, go back to the target line, and press Vp
(select the line with a visual selection, and replace the visual selection with the previously yanked line).
pkdd
? (It's one keypress less for theShift
) – yo' Feb 3 '15 at 19:04pkdd
:) – Jasper Feb 3 '15 at 19:08