Pressing yl I can copy the character where cursor locates. Now I press : to enter into last line mode, I enter %s/. Now I want to paste the character copied by yl. How can I do that?

enter image description here


You can use Ctrl+R, " to insert the contents of the default register into the Ex command line. The default register is where what you just yanked will be.

See :help c_CTRL-R for details.

  • 1
    Long way: open up the command window (ctrl-f) and p it in normal mode
    – D. Ben Knoble
    Jun 11 '20 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.