Skip to content

Instantly share code, notes, and snippets.

@gfixler
Created November 10, 2017 04:37
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 gfixler/488645c70f84381d8b78099fbbc138a4 to your computer and use it in GitHub Desktop.
Save gfixler/488645c70f84381d8b78099fbbc138a4 to your computer and use it in GitHub Desktop.
Vim install script
#!/bin/bash
# based on:
# https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox gvim
# removed python3 flag, as Vim on Ubuntu (16.04, currently) can't support 2.x and 3.x simultaneously
# changed config directory based on where mine actually is (found others online doing same)
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/ \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local
make VIMRUNTIMEDIR=/usr/local/share/vim/vim80
sudo checkinstall
sudo update-alternatives --install /usr/local/bin/editor editor /usr/local/bin/vim 1
sudo update-alternatives --set editor /usr/local/bin/vim
sudo update-alternatives --install /usr/local/bin/vi vi /usr/local/bin/vim 1
sudo update-alternatives --set vi /usr/local/bin/vim
sudo ln -s /usr/local/bin/vim /usr/bin/vim
sudo ln -s /usr/local/bin/vi /usr/bin/vi
sudo ln -s /usr/local/bin/view /usr/bin/view
sudo ln -s /usr/local/bin/vimdiff /usr/bin/vimdiff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment