15
3
I just started with Vim yesterday and am having trouble understanding copy & paste. I understand to copy I enter visual mode, highlight and then yank. I then move to the line I wish to paste onto, but more often then not I need to delete some text from this line. I do this using x
or dw
. This then results in my original copy being overwritten (as x
and dw
seem to cut). How do I get around this?
To put it into an example
$foo = $this->foo->property;
thislineuses($foo);
So with the above code I copy $this->foo->property
, I then would want to go onto line 2, delete $foo
and paste. I problem is when I delete $foo
from line 2 this is then what gets pasted instead of $this->foo->property
.
this is nice because you don't have to think about intermediate registers to yank into. it just works. – Jon Schoning – 2012-02-08T17:14:15.040