2013-03-22 18:06:04 -07:00
|
|
|
#!/usr/bin/env zsh
|
2013-03-16 21:16:00 -07:00
|
|
|
|
2013-03-22 10:15:50 -07:00
|
|
|
# Installing macvim/compiling vim
|
|
|
|
if is_mac && ! command_exists "mvim"; then
|
|
|
|
echo-g "==> Installing macvim"
|
|
|
|
brew install macvim --with-cscope --override-system-vim
|
2013-03-23 01:47:55 -07:00
|
|
|
elif is_deb && ! vim --version | grep "Compiled by $(whoami)@$(hostname)" 2>&1 >/dev/null; then
|
2013-03-22 10:15:50 -07:00
|
|
|
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
|
|
|
|
2013-03-22 10:15:50 -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 \
|
|
|
|
--enable-gui=gtk2 --enable-cscope --prefix=/usr
|
|
|
|
make VIMRUNTIMEDIR=/usr/share/vim/vim73
|
|
|
|
sudo make install
|
|
|
|
rm -rf ~/vim
|
2013-03-16 21:28:28 -07:00
|
|
|
fi
|
|
|
|
|
2013-03-22 10:15:50 -07:00
|
|
|
# Installing vim rcfiles
|
2013-03-16 21:31:04 -07:00
|
|
|
if [ ! -e ~/.vimrc ]; then
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> Installing vim rcfiles"
|
2013-03-16 21:28:28 -07:00
|
|
|
|
2013-03-22 13:08:02 -07:00
|
|
|
if [ -d ~/.vim ]; then
|
2013-03-16 21:28:28 -07:00
|
|
|
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-23 01:17:34 -07:00
|
|
|
if is_deb; then
|
|
|
|
pkg-install cmake
|
|
|
|
fi
|
2013-03-23 01:49:03 -07:00
|
|
|
|
|
|
|
# Install vim from my distro: https://github.com/hlissner/mlvim
|
2013-03-23 01:48:07 -07:00
|
|
|
bash <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)
|
2013-03-23 01:17:34 -07:00
|
|
|
else
|
|
|
|
# Installing/updating vim bundles
|
|
|
|
echo-g "==> 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
|
2013-03-16 21:49:58 -07:00
|
|
|
fi
|
|
|
|
|
2013-03-22 10:15:50 -07:00
|
|
|
echo-g "==> Vim: DONE!"
|