6

Sometimes I copy text from the buffer in VM and I want to use it in an editor command. Is there some way to paste it from a register into the command text using only the keyboard?

3
  • Note that this question is actually asking about "registers". "Buffer" means something else entirely in both vi and vim.
    – Wildcard
    Commented Oct 12, 2015 at 23:23
  • @wildcard Well ya take the text from the buffer to a register and then paste it into the command.
    – leeand00
    Commented Oct 13, 2015 at 1:36
  • 1
    Actually I found out since I wrote the above comment that the POSIX specifications for vi use the term "buffer" rather than "register". I still think using the term "register" is better, though, to distinguish from the "edit buffer."
    – Wildcard
    Commented Jan 27, 2016 at 4:36

1 Answer 1

11

Yep, just like in insert mode: Ctrl-R followed by the register name, or " for the default one (i.e. Ctrl-R "). See :h c_CTRL-R.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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