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?

  • Note that this question is actually asking about "registers". "Buffer" means something else entirely in both vi and vim.
    – Wildcard
    Oct 12 '15 at 23:23
  • @wildcard Well ya take the text from the buffer to a register and then paste it into the command.
    – leeand00
    Oct 13 '15 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
    Jan 27 '16 at 4:36

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, privacy policy and cookie policy

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