helm/install/vim
Henrik Lissner 87917109f8 Cleanup code
2013-03-21 12:33:12 -04:00

43 lines
1,020 B
Bash
Executable file

#!/bin/zsh
if ! command-exists "brew"; then
echo "Homebrew is required!"
exit
fi
if ! command-exists "mvim"; then
echoh "==> Vim: Installing macvim"
brew install macvim --with-cscope --override-system-vim | indent
fi
if [ ! -e ~/.vimrc ]; then
echoh "==> Vim: Installing vim rcfiles"
if [ -d ~/.vim ]; then
rm -rf ~/.vim
rm ~/.vimrc
rm ~/.vimrc.bundles
rm ~/.gvimrc
fi
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L) | indent
fi
echoh "==> Vim: Updating..."
{
find ~/.vim/bundle/ -type d -name .git \
| xargs -n 1 dirname \
| while read line; do cd $line && echo -n "$(basename $line): " && git pull; done
} | indent
YVM_DIR="~/.vim/bundle/YouCompleteMe"
if [ -d $YVM_DIR ] && [ ! -e $YVM_DIR/python/ycm_core.so ]; then
echoh "==> Vim: Trying to compile YCM"
{
brew install cmake
cd ~/.vim/bundle/YouCompleteMe
./install.sh --clang-completer
} | indent
fi
echoh "==> Vim: DONE!"