From Chen's Wiki

Jump to: navigation, search

Determine the support

vim --version | grep clipboard

If it shows:


This means you haven't the support for the system clipboard for vim yet.

All you need to do is:

sudo apt-get install vim-gui-common


Once you have the plus sign before xterm_clipboard, this means you can use the + or the * register to access the system clipboard.

To specify the register to use in vim, you do


For example, yanking the current line to the system clipboard:


Copy the system clipboard in vim: