Accessing X Clipboard with Vim

You can access the X clipboard in Vim by using the ‘+’ buffer.

So to paste from your system clipboard into Vim use:

"+p

And to copy the current line to system clipboard use:

"+Y

On Ubuntu 5.10 (“Breezy Badger”) this only works (in both vim and gvim) once you have installed gvim:

sudo apt-get install gnome-vim

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.