Skip to content

Instantly share code, notes, and snippets.

@derek-adair
Last active March 25, 2020 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derek-adair/9c13d0c760dcd45659fc3dfb45558368 to your computer and use it in GitHub Desktop.
Save derek-adair/9c13d0c760dcd45659fc3dfb45558368 to your computer and use it in GitHub Desktop.
Compile and install vim w/ YouCompleteMe
#Install the deps
sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
python3-dev ruby-dev lua5.1 liblua5.1-dev libperl-dev git
#Remove all the vims
sudo apt remove vim vim-runtime gvim vim-tiny vim-common
# Make sure they are alllll gone
dpkg -l | grep vim
#Compile Vim
cd ~
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ # pay attention here check directory correct
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local
make VIMRUNTIMEDIR=/usr/local/share/vim/vim81
#Install Vim
sudo apt install checkinstall
cd ~/vim
sudo checkinstall
#Check that python is installed (+python should be seen)
vim --version
# update alternatives
sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
sudo update-alternatives --set editor /usr/local/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
sudo update-alternatives --set vi /usr/local/bin/vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment