Vim

Setup VIM To Use The System Clipboard

Posted by Weston Ganger on August 11, 2015

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:


Posted in Linux and Tagged with linux vim clipboard 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts