For example

How can I yank and paste Line 4 only to Line 12 without having to move the cursor to Line 4?

|
For example
How can I yank and paste Line 4 only to Line 12 without having to move the cursor to Line 4?
|
|||||
|
|
If the cursor is already on line 12, then a simple :4y P does it for me. |
|||||||
|
|
How about this: Cursor is on line 11, you're in "vi" mode.
You can apparently also do it with a pattern:
You could use "mo" (move) instead of "co" (copy) to just move the line, instead of yank and put. |
|||
|
|
|
This should do it:
|
||||
|
Try:
You can use an argument of
will copy lines |
||||
|
|