I wanted VIM to use the system clipboard so I could yank/paste to/from other applications easily.

First edit your .vimrc

# ~/.vimrc
set clipboard=unnamedplus

Next check to see if your current vim version supports xterm_clipboard

vim --version

If you see “+xterm_clipboard” then its ready to go.

If you see “-xterm_clipboard” then we need to upgrade vim.

If you are running Debian:

sudo apt-get install vim-gnome

If you are running Redhat or CentOS:

You have to install vim-x11 afterwards you have to use vimx instead of vim. (Its handy to make an alias)

sudo yum install vim-x11

Now you should be able to use the clipboard back and forth between vim and other applications.

Related External Links: