Skip to content

Instantly share code, notes, and snippets.

@ahmgeek
Forked from sevko/README.md
Created March 6, 2017 01:26
Show Gist options
  • Save ahmgeek/4dcb0e8f391f6a072293407c46504baf to your computer and use it in GitHub Desktop.
Save ahmgeek/4dcb0e8f391f6a072293407c46504baf to your computer and use it in GitHub Desktop.
Compile a full-featured Vim (w/ Python, Ruby, etc.).

compile full Vim

The default Vim installed on most Linux distros lacks a number of vital features, like xterm_clipboard (allows copy-and-pasting to the system clipboard) and python (on which certain plugins rely). The compile_full_vim.sh shell script removes the currently installed Vim and compiles a full-featured version; it's based entirely off Valloric's YouCompleteMe walkthrough, which it bundles into a simple script for convenience. Vim will be compiled with the following feature flags:

  • --with-features=huge
  • --enable-multibyte
  • --enable-rubyinterp
  • --enable-pythoninterp
  • --enable-perlinterp
  • --enable-luainterp
  • --enable-gui=gtk2
  • --enable-cscope

Note that it's written for anything Debian-like. See the original walkthrough for help with other distros.

#! /bin/bash
# Description:
# Compile a full-featured Vim from source on Ubuntu/Debian distros. Based
# entirely on
# https://github.com/Valloric/YouCompleteMe/wiki/Building-Vim-from-source
#
# Use:
# ./compile_full_vim.sh
main(){
echo "y" | sudo apt-get remove \
vim \
vim-runtime \
gvim \
vim-tiny \
vim-common \
vim-gui-common
echo "y" | sudo apt-get 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 ruby-dev \
mercurial
cd ~
hg clone https://code.google.com/p/vim/
cd vim
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-perlinterp \
--enable-luainterp \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim74
sudo make install
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment