Skip to content

Instantly share code, notes, and snippets.

@xxxVxxx
Last active August 29, 2015 14:20
Show Gist options
  • Save xxxVxxx/b8c3cd97d4e6823d0330 to your computer and use it in GitHub Desktop.
Save xxxVxxx/b8c3cd97d4e6823d0330 to your computer and use it in GitHub Desktop.
vim74 govim neocomplete with lua5.1 ubuntu

####SETUP VIM with LUA support (needed for neocomplete)

sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common 
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial 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

sudo rm /usr/bin/vim
sudo mkdir /usr/include/lua5.1/include
sudo mv /usr/include/lua5.1/*.h /usr/include/lua5.1/include/
sudo ln -s /usr/bin/luajit-2.0.0-beta9 /usr/bin/luajit  #this should already exist but still no harm in checking
cd ~
hg clone https://code.google.com/p/vim/
cd vim/src
make distclean
./configure --with-features=huge \
--enable-rubyinterp \
--enable-largefile \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib/python2.7/config \
--enable-perlinterp \
--enable-luainterp \
--with-luajit \
--enable-gui=auto \
--enable-fail-if-missing \
--with-lua-prefix=/usr/include/lua5.1 \
--enable-cscope
make VIMRUNTIMEDIR=/usr/share/vim/vim74  ### can set it to /usr/local/share/vim/vim74 too. Depends on your needs
sudo make install

Below lines are only required if you previously had a lot of stuff in /usr/local/share/vim/vim74 and wanna migrate to /usr/share/ location

sudo mv /usr/share/vim/vim74{, .back}
sudo ln -s /usr/local/share/vim/vim74 /usr/share/vim/vim74 

#####Install pathogen

mkdir -p ~/.vim/autoload ~/.vim/bundle
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
edit ~/.vimrc  and add
call pathogen#infect()

#####Install Neocomplete

cd ~/.vim/bundle
git clone https://github.com/Shougo/neocomplete.vim.git
edit ~/.vimrc and add
let g:neocomplete#enable_at_startup = 1

#####Install Vim-Go

cd ~/.vim/bundle
git clone https://github.com/fatih/vim-go.git
edit ~/.vimrc and add
syntax enable  
filetype plugin on  
set number  
let g:go_disable_autoinstall = 0 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment