Vim 8 with system clipboard on 16.04 LTS
I have install Vim 8 (so that I can use ale). Unfortunately I can't seem to get the system clipboard to work. (E.g. using vim-gnome
I would use the "+y
to yank to the system clipboard. Has anybody got this working?
I installed Vim 8 using:
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim
Solution 1:
If after adding the jonathanf/vim
PPA you apt install vim
, it installs vim.basic
. If you instead apt install vim-gtk3
, then you get vim.gtk3
which has +clipboard
, and thus the system clipboard. Regardless of which one you install, it will get symlinked to /usr/bin/vim
(converted my comment to an answer in case anyone else stumbles into here)
Solution 2:
I was able to get what I needed by building from the source with the following:
$ sudo apt-get remove vim # to remove the binary I had installed
$ sudo apt build-dep vim
$ git clone [email protected]:vim/vim.git
$ cd vim/src
$ ./configure --enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-python3interp=yes \
--with-python3-config-dir=/usr/lib/python3.5/config \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-cscope \
--prefix=/usr \
--enable-gui=auto --enable-gtk2-check --with-x # this is what I needed
$ make
$ sudo make install