Installing Vim8 with lua-interp Feature

     

Compilation Circa 91’ Bonanza

Alright now, I know I’ve dealt with this a couple times if not more, and by “this” I mean having a Vim8 install without the Lua interpreter feature! And it’s fuckin ridiculous that I’m having to compile a 25+ yr. old text editor from source to get auto-complete to function properly. Hence why I am such a flamboyant Sublime Text Editor cheerleader! However, not getting into that debate at the moment (don’t wanna kick you while you’re down), I’d rather focus more on a solution such that one could carry on with his/her tasks, whether it be on a server (in my case), container, or workstation. So I’ve gotten these features installed in Vim8 on debian and ubuntu both headless (or faceless), meaning without GNOME or KDE or rather more precisely GTK+ or Qt toolkits. So with that being said, you probably can get away dropping the Huge Feature and go with vim-nox. Not positive, but certainly not vim-tiny I’m sure of.

Some Context: So the older I’ve been getting I’ve become entirely content on running with community driven, pre-configured dotfiles and environments, just as long as they’re consistent (standardized), efficient (extensible), and of course sexy (aesthetics)! I’m aware most developers have their own dotfiles repos and custom ways of configuring their environment for productivity, hence why vim and emacs are so popular! However, my satisfaction here basically falls right in line with my “just fuckin install Sublime argument!” However, I understand (to well) that’s not always an option due to corporate policies or simply time constraints so you have to make the best of what you got! Not by any means am I dogging Vim and all its power and gracefulness, given it was my very first text editor as a programmer, and prob will remain in my toolbox forever, it’s just a pain in my ass sometimes!

So anyway, here are the two examples I referenced, taking a little from both, to get vim8 configured correctly with spf13-vim. As I’m sure if you’ve ran into this same thing your first attempt or perhaps only vim8 install was from Jonathon’s Personal Package Archive (PPA). This backport is great and works like a charm with good ol’ faithful aptitude repos. however when I used it, vim8 was installed without many new/needed features. Hence source compilation circa 91’ bonanza!!

I’ve provided the results of my compiled binary at the bottom, yours should match somewhat similar!


Sample 1

sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common

sudo apt-get build-dep vim-gnome # this didn't seem to work for me

sudo apt-get install build-essential liblua5.3-0 liblua5.3-dev python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev

sudo rm -rf /usr/local/share/vim /usr/bin/vim /usr/local/bin/vim

sudo mkdir /usr/include/lua5.3/{include,lib}

sudo cp /usr/include/lua5.3/\\\\\\\\\\\\\\\*.h /usr/include/lua5.3/include/

sudo ln -sf /usr/lib/x86_64-linux-gnu/liblua5.3.so /usr/include/lua5.3/lib/liblua.so

sudo ln -sf /usr/lib/x86_64-linux-gnu/liblua5.3.a /usr/include/lua5.3/lib/liblua.a

cd /tmp

git clone https://github.com/vim/vim.git

cd vim/

make distclean #themoreyouknow

./configure --with-features=huge
            --enable-rubyinterp
            --enable-largefile
            --disable-netbeans
            --enable-python3interp
            --with-python-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu
            --enable-perlinterp
            --enable-luainterp
            --enable-gui=auto
            --enable-fail-if-missing
            --with-lua-prefix=/usr/include/lua5.3
            --enable-cscope
            --enable-multibyte

make sudo make installsudo mkdir /usr/include/lua5.3/{include,lib}

credits to some random gist I’ll find later


Sample 2

sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common

sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev

# Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall

sudo rm -rf /usr/local/share/vim /usr/bin/vim

cd /tmp
git clone https://github.com/vim/vim
cd vim
git pull && git fetch

# In case Vim was already installed
make distclean

./configure \
      --enable-multibyte \
      --enable-perlinterp=dynamic \
      --enable-rubyinterp=dynamic \
      --with-ruby-command=/usr/bin/ruby \
      --enable-pythoninterp=dynamic \
      --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \
      --enable-python3interp \
      --with-python3-config-dir=/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu \
      --enable-luainterp \
      --with-luajit \
      --enable-cscope \
      --enable-gui=auto \
      --with-features=huge \
      --with-x \
      --enable-fontset \
      --enable-largefile \
      --disable-netbeans \
      --with-compiledby="yourmom" \
      --enable-fail-if-missing

make && sudo make install

– credits to some random gist I’ll find later


Finally installed on 16.04.4 LTS (Xenial Xerus)

Results

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled May 17 2018 23:27:34)
Included patches: 1-1848
Compiled by yourmom
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               +farsi             +mouse_sgr         -tag_any_white
+arabic            +file_in_path      -mouse_sysmouse    -tcl
+autocmd           +find_in_path      +mouse_urxvt       +termguicolors
-autoservername    +float             +mouse_xterm       +terminal
+balloon_eval      +folding           +multi_byte        +terminfo
+balloon_eval_term -footer            +multi_lang        +termresponse
+browse            +fork()            -mzscheme          +textobjects
++builtin_terms    -gettext           -netbeans_intg     +timers
+byte_offset       -hangul_input      +num64             +title
+channel           +iconv             +packages          +toolbar
+cindent           +insert_expand     +path_extra        +user_commands
+clientserver      +job               +perl/dyn          +vertsplit
+clipboard         +jumplist          +persistent_undo   +virtualedit
+cmdline_compl     +keymap            +postscript        +visual
+cmdline_hist      +lambda            +printer           +visualextra
+cmdline_info      +langmap           +profile           +viminfo
+comments          +libcall           +python/dyn        +vreplace
+conceal           +linebreak         +python3/dyn       +wildignore
+cryptv            +lispindent        +quickfix          +wildmenu
+cscope            +listcmds          +reltime           +windows
+cursorbind        +localmap          +rightleft         +writebackup
+cursorshape       +lua               +ruby/dyn          +X11
+dialog_con_gui    +menu              +scrollbind        -xfontset
+diff              +mksession         +signs             +xim
+digraphs          +modify_fname      +smartindent       +xpm
+dnd               +mouse             +startuptime       +xsmp_interact
-ebcdic            +mouseshape        +statusline        +xterm_clipboard
+emacs_tags        +mouse_dec         -sun_workshop      -xterm_save
+eval              -mouse_gpm         +syntax
+ex_extra          -mouse_jsbterm     +tag_binary
+extra_search      +mouse_netterm     +tag_old_static

comments powered by Disqus