52 lines
1.5 KiB
Bash
Executable file
52 lines
1.5 KiB
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
# Installing macvim/compiling vim
|
|
if is_mac && ! command_exists "mvim"; then
|
|
echo-g "==> Installing macvim"
|
|
brew install macvim --devel --with-lua --override-system-vim
|
|
elif is_deb && ! vim --version | grep "Compiled by $(whoami)@$(hostname)" 2>&1 >/dev/null; then
|
|
echo-g "==> Preparing to compile vim from source"
|
|
pkg-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
|
|
pkg-remove vim vim-runtime gvim
|
|
|
|
cd ~
|
|
hg clone https://code.google.com/p/vim/
|
|
cd vim
|
|
echo-g "==> Compiling vim from source"
|
|
./configure --with-features=huge \
|
|
--enable-rubyinterp \
|
|
--enable-pythoninterp \
|
|
--enable-perlinterp \
|
|
--enable-luainterp \
|
|
--enable-gui=gtk2 --enable-cscope --prefix=/usr
|
|
make VIMRUNTIMEDIR=/usr/share/vim/vim74b
|
|
sudo make install
|
|
rm -rf ~/vim
|
|
fi
|
|
|
|
# Installing vim rcfiles
|
|
if [ ! -e ~/.vimrc ]; then
|
|
echo-g "==> Installing vim rcfiles"
|
|
|
|
if [ -d ~/.vim ]; then
|
|
rm -rf ~/.vim
|
|
rm ~/.vimrc
|
|
rm ~/.vimrc.bundles
|
|
rm ~/.gvimrc
|
|
fi
|
|
if is_deb; then
|
|
pkg-install cmake
|
|
fi
|
|
|
|
# Install vim from my distro: https://github.com/hlissner/mlvim
|
|
bash <(curl https://raw.github.com/hlissner/vim/master/install.sh -L)
|
|
else
|
|
# Installing/updating vim bundles
|
|
echo-g "==> Vim: Updating..."
|
|
vim +NeoBundleUpdate +qall
|
|
fi
|
|
|
|
echo-g "==> Vim: DONE!"
|