vim copy and replace text

前端 未结 10 2227
名媛妹妹
名媛妹妹 2021-02-14 18:02

Lets say that i have this text:

$test = \'lorem\';
$test2= \'ipsum\';

and I want to copy lorem and paste into ipsum. I tried to do yi\' on lor

10条回答
  •  北荒
    北荒 (楼主)
    2021-02-14 18:54

    Go to the l of lorem, ye (yank to end of word). Go to the i of ipsum, "_de (delete to end of word, putting the deleted text in the black hole register. P (paste register before cursor).

    Altogether: yej"_deP

提交回复
热议问题