vim copy and replace text

前端 未结 10 2256
名媛妹妹
名媛妹妹 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:43

    After you do ci' on impsum your lorem is in register "0. So, you can do ci'^R0 (^R means Ctrl+r) and paste your lorem in place of ipsum.

    See :help quote_number for more info on numbered registers.

提交回复
热议问题