helm/install/vim

58 lines
1.7 KiB
Plaintext
Raw Normal View History

2013-03-16 21:16:00 -07:00
#!/bin/zsh
# Installing macvim/compiling vim
if is_mac && ! command_exists "mvim"; then
echo-g "==> Installing macvim"
brew install macvim --with-cscope --override-system-vim
elif is_deb; 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
2013-03-16 21:16:00 -07:00
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 \
echo
--enable-gui=gtk2 --enable-cscope --prefix=/usr
make VIMRUNTIMEDIR=/usr/share/vim/vim73
sudo make install
rm -rf ~/vim
fi
# Installing vim rcfiles
2013-03-16 21:31:04 -07:00
if [ ! -e ~/.vimrc ]; then
echo-g "==> Installing vim rcfiles"
2013-03-22 13:08:02 -07:00
if [ -d ~/.vim ]; then
rm -rf ~/.vim
2013-03-21 09:33:12 -07:00
rm ~/.vimrc
rm ~/.vimrc.bundles
rm ~/.gvimrc
fi
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L) | indent
fi
2013-03-16 21:16:00 -07:00
# Installing/updating vim bundles
echo-g "==> Vim: Updating..."
2013-03-21 19:26:04 -07:00
find ~/.vim/bundle/ -type d -name .git \
| xargs -n 1 dirname \
| while read line; do cd $line && echo -n "$(basename $line): " && git pull; done
2013-03-16 21:16:00 -07:00
# Compiling YouCompleteMe
2013-03-21 09:33:12 -07:00
YVM_DIR="~/.vim/bundle/YouCompleteMe"
if [ -d $YVM_DIR ] && [ ! -e $YVM_DIR/python/ycm_core.so ]; then
echo-g "==> Vim: Trying to compile YCM"
pkg-install cmake
2013-03-21 19:26:04 -07:00
cd ~/.vim/bundle/YouCompleteMe
./install.sh --clang-completer
2013-03-16 21:49:58 -07:00
fi
echo-g "==> Vim: DONE!"