cef4wq
Last Updated: February 25, 2016
·
1.396K
· coldgrnd
Oli

compile vim with luajit

get vim repo

cd ~/dev/hg
hg clone https://code.google.com/p/vim/
cd vim

clean out previous versions

sudo apt-get remove vim vim-runtime gvim
sudo apt-get remove vim-tiny vim-common vim-gui-common

install/link prerequisites

sudo apt-get install python2.7-dev
sudo apt-get install libperl-dev
sudo apt-get install libluajit-5.1-dev

link luajit headers

/usr/local/include $ sudo ln -sv /usr/include/luajit-2.0/lua.h
/usr/local/include $ sudo ln -sv /usr/include/luajit-2.0/luaconf.h
/usr/local/include $ sudo ln -sv /usr/include/luajit-2.0/lualib.h
/usr/local/include $ sudo ln -sv /usr/include/luajit-2.0/lauxlib.h
cd `which luajit-2.0.0-beta9`
sudo ln -sv luajit-2.0.0-beta9 luajit

configure & make

cd ~/dev/hg/vim
./configure --with-features=huge --enable-rubyinterp --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config --enable-perlinterp --enable-gui=gtk2 --enable-cscope --prefix=/usr --enable-luainterp  --with-luajit --enable-fail-if-missing --enable-largefile --with-lua-prefix=/usr/local
make VIMRUNTIMEDIR=/usr/share/vim/vim74

what to put into --with-python-config-dir:

locate python | grep '/config$'

use checkinstall

sudo apt-get install checkinstall
cd ~/dev/hg/vim
sudo checkinstall

later vim could be uninstalled using:

sudo dpkg -r vim

Set vim as your default editor with update-alternatives.

sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1
sudo update-alternatives --set editor /usr/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1
sudo update-alternatives --set vi /usr/bin/vim
Say Thanks
Respond
Awesome Job

20838750 ca12 11e7 8395 3d07316c018d
Overijssel,Amsterdam, Arnhem
·
Overijssel, Amsterdam, Arnhem
·
Full Time