Skip to content

Instantly share code, notes, and snippets.

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 JarenGlover/3e40d6af73f8bd0590e1 to your computer and use it in GitHub Desktop.
Save JarenGlover/3e40d6af73f8bd0590e1 to your computer and use it in GitHub Desktop.
I was having trouble getting lua support while rolling my own vim 7.4 on ubuntu 14.04.
#!/usr/bin/env bash
#run with a user with sudoers privilege
#update before apt-get
sudo apt-get update
#install lua (please note 5.3 was released in 2015)
sudo apt-get install lua5.2 liblua5.2
# Remove old vims
sudo apt-get remove vim vim-runtime gvim
sudo apt-get remove vim-tiny vim-common vim-gui-common
#install all the prerequisite libraries vim
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
#housekepping for lua
sudo mkdir /usr/include/lua5.2/include/
sudo cp /usr/include/lua5.2/* /usr/include/lua5.2/include/
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/local/lib/liblua.so
# download and pass proper parameters
hg clone https://code.google.com/p/vim/
cd vim
./configure --with-features=huge \
--enable-rubyinterp \
--enable-pythoninterp=yes \
--with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
--enable-multibyte \
--enable-fontset \
--disable-netbeans \
--enable-luainterp=yes \
--with-lua-prefix=/usr/include/lua5.2 \
--enable-cscope \
--enable-largefile \
--prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim74
#If you want to be able to easily uninstall the package use checkinstall instead of sudo make install
sudo apt-get install checkinstall
sudo checkinstall
# PLEASE NOTE: you might need to update your .vimrc with the below command for backspace to work
# "set backspace=indent,eol,start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment