Linux Mint Xfce
By default, Ubuntu (so as to Linux Mint) installs the vim-tiny package, which is a ultra-light version of the console "vim" only.
To check the clipboard support of the installed vim, run vim --version|grep clipboard
.
If you get "-clipboard" and "-xterm_clipboard", your vim can't support system clipboard.
You have to remove current vim, and install a "full" version vim like this:
$ sudo apt-get purge vim
$ sudo apt-get autoremove # remove related packages of vim
$ sudo apt-get install vim-gtk # gtk suited for Xfce environments
Now let's check:
$ vim --version | grep clipboard
You should get something like "+clipboard" and "+xterm_clipboard".
Now connect vim clipboard with that of system with adding "set clipboard=unnamedplus" into you ~/.vimrc. And check it:
-
Copy texts in web browser with Ctrl-c, and use "p" to paste them in vim;
-
copy a line in vim with "yy", then paste them into some GUI program (say, gedit) with Ctrl-v.
Ref:
how to copy from vim and paste it on system clip board
ArchLinux
Install gvim with sudo pacman -S gvim
.
Note: On CentOS, use yum search vim
to get the exact vim package name. On CentOS 6.4 it's "vim-X11".