2013-03-16 21:16:00 -07:00
|
|
|
#!/bin/zsh
|
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
if ! command-exists "brew"; then
|
2013-03-16 21:16:00 -07:00
|
|
|
echo "Homebrew is required!"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
if ! command-exists "mvim"; then
|
|
|
|
echoh "==> Vim: Installing macvim"
|
|
|
|
brew install macvim --with-cscope --override-system-vim | indent
|
2013-03-16 21:28:28 -07:00
|
|
|
fi
|
|
|
|
|
2013-03-16 21:31:04 -07:00
|
|
|
if [ ! -e ~/.vimrc ]; then
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Vim: Installing vim rcfiles"
|
2013-03-16 21:28:28 -07:00
|
|
|
|
|
|
|
if [ -d ~/.vim ]; then
|
|
|
|
rm -rf ~/.vim
|
2013-03-21 09:33:12 -07:00
|
|
|
rm ~/.vimrc
|
|
|
|
rm ~/.vimrc.bundles
|
|
|
|
rm ~/.gvimrc
|
2013-03-16 21:28:28 -07:00
|
|
|
fi
|
2013-03-21 00:07:56 -07:00
|
|
|
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L) | indent
|
2013-03-16 21:28:28 -07:00
|
|
|
fi
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
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
|
2013-03-16 21:16:00 -07:00
|
|
|
|
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
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Vim: Trying to compile YCM"
|
|
|
|
{
|
|
|
|
brew install cmake
|
|
|
|
cd ~/.vim/bundle/YouCompleteMe
|
|
|
|
./install.sh --clang-completer
|
|
|
|
} | indent
|
2013-03-16 21:49:58 -07:00
|
|
|
fi
|
|
|
|
|
2013-03-21 00:07:56 -07:00
|
|
|
echoh "==> Vim: DONE!"
|