Vim: Yank distant line without moving
vim
Solution
Try this:
:+3y
It uses the range `+3` , that it is the point where it will begin to yank. and by default it does one line.
UPDATE: If you wanted to copy both the second and third line without moving cursor, you would use same command but with a range of two points, like:
:+2,+3y
It would copy both `Puppies` and `Humans`.
Problem
Suppose I have the following (* = cursor): ``` ... * Kittens Puppies Humans ... ``` How do I yank the "Humans" (cursor relative 3rd line) while leaving the cursor in place? Preferably in one motion or one (generic) command.