I’ve been using Vim and some handy plugins for a while. Today when I was trying to use the “copy-to-clipboard” combo-key "+y
in Vim, I found that it didn’t work for me. After doing some Google search I realized that to use the “copy-to-clipboard” function the Vim has to enable GUI. However, the Vim on my computer didn’t support GUI:
I followed the link to install vim-gtk
. But after the installation the default Python interpreter for Vim is changed to python3
. When I was configuring the Vim plugin YouCompleteMe
before, I ran into some incompatiable issues with python3
, and had to switch to python
.
I’ve forgot how I made it to change back to python
before. So I recompiled Vim from source this time and made some notes below:
Remove current Vim installation
For removing Vim using aptitude
, refer to link:
For removing Vim installed from source, cd
to the source code directory and run commands below
Install Vim8.0 from source
Download the source code:
Don’t forget to add the --enable-gui
option:
If the above command fails to work, and displays an error like checking for tgetent()... configure: error: NOT FOUND!
, you’ll need to install a library according to this link.
If you want to be able to easily uninstall Vim in the future, use checkinstall
(refer to link):
Otherwise, run sudo make install
to finish the installation.
Double check the new version
|
|