[Resolved] How Does ]vim Quickly Paste Text Just Entered

  question, vim

Business background

Often after copying a paragraph of text
Some names in this passage need to be replaced.
The current mode of operation is

  1. number yy
  2. p
  3. /words to be modified
  4. Ec manual input
  5. Always circulating


const a = param => param + 1;
 module.exports.a = a
 //convert a to b
 const a = param => param + 1;
 module.exports.a = a
 const b = param => param + 1;
 module.exports.b = b


  1. %sGlobal replacement is not possible because theaCan’t be replaced, if you choose to replace it, you have to choose it again, which feels a bit troublesome.
  2. Copyb, and then locate alla, paste, and then copy b … this step is mainly, choose a and paste, the next clip is a, so also trouble


Often in operationvimSometimes when the case is wrong, the text just entered will be pasted occasionally … what is this command? I feel that this command can solve my current needs.


After entering B for the first time, you only need to set the players on A. Click.It can be replaced automatically

Dot is. This will repeat your last modification