Last Updated: February 25, 2016
·
731
· tralamazza

vim X11 clipboard nirvana

"I know thy works, that thou clipboard neither work with X11 nor Windows ..." Book of VimRevelation 3:15

First check if your vim has the xterm_clipboard patch:

vim --version | grep \+xterm_clipboard

if it's missing:

  • Install vim-X11 fedora or vim-gui-common Ubuntu package
  • If necessary use vimx instead of plain vim:

    alias vim=`which vimx`

To yank something to your clipboard, select a line/block and type "yy, or paste it using "p. Just prefix your usual commands with " to use the X11 clipboard.

Source: http://vim.wikia.com/wiki/Accessing_the_system_clipboard