Skip to content

Instantly share code, notes, and snippets.

@pedrolopez
Created June 4, 2014 19:28
Show Gist options
  • Save pedrolopez/34d2681033d8d59a0f75 to your computer and use it in GitHub Desktop.
Save pedrolopez/34d2681033d8d59a0f75 to your computer and use it in GitHub Desktop.

Installation

In order to get support for the clipboard and necessary interpreters, we need to compile and install from source.

# install build dependencies for vim:
sudo apt-get -y build-dep vim

# install some additional, necessary tools:
sudo apt-get -y install checkinstall mercurial python-dev python3.3-dev

# clone the latest version of vim source:
sudo hg clone https://vim.googlecode.com/hg/ /usr/local/src/vim

# change to src directory
pushd /usr/local/src/vim

# build our makefile (install to /usr/local):
sudo ./configure \
    --prefix=/usr/local \
    --enable-gui=no \
    --with-features=huge \
    --with-x \
    --enable-cscope \
    --enable-perlinterp \
    --enable-luainterp \
    --enable-rubyinterp \
    --enable-pythoninterp \
    --with-python-config-dir=$(python2.7-config --configdir)

## python3 support (not currently working)
#  --enable-python3interp \
#  --with-python3-config-dir=$(python3.3-config --configdir)
# 
# with gui support
#  --enable-gui=auto \
#  --enable-gtk2-check \
#  --enable-gnome-check
#
# for additional configuration options use ./configure --help

# build vim, specify the runtimedir
sudo make VIMRUNTIMEDIR=/usr/share/vim/vim74

# install vim using checkinstall (debian)
sudo checkinstall

# return to previous directory
popd

# install /usr/local/bin/vim as alternative for vi, vim, and editor
sudo update-alternatives --install "/usr/bin/vim" "vim" "/usr/local/bin/vim" 1
sudo update-alternatives --install "/usr/bin/vi" "vi" "/usr/local/bin/vim" 1
sudo update-alternatives --install "/usr/bin/editor" "editor" "/usr/local/bin/vim" 1

# set /usr/local/bin/vim as default for vi, vim and editor
sudo update-alternatives --set vim "/usr/local/bin/vim"
sudo update-alternatives --set vi "/usr/local/bin/vim"
sudo update-alternatives --set editor "/usr/local/bin/vim"

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment