How to Paste From a Clipboard to Vim

Save

One of the advantages of the Vim text editor is that it supports multiple clipboards or, in Vim terminology, registers. This allows the user to store and retrieve multiple pieces of information, but only one register represents the system clipboard. It is not the default register, but the "asterisk" register.

  • Press the "Escape" key to enter command mode.

  • Press the double-quote character (") to enable pasting from a buffer or register.

  • Press the asterisk key (*) to select the system clipboard as the buffer from which to paste.

  • Press "p" to paste the text from the clipboard.

Tips & Warnings

  • An alternative that works in some versions of VIM, but not all, is pressing "Shift-Insert" while in Insert mode.
  • Just as you can press "*p" to paste from the system clipboard, you can use "*y" to yank, or copy, to the system clipboard.

References

Promoted By Zergnet

Comments

Resources

You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!