From d2a57cd443e749218f19e09bdc7d406256d31866 Mon Sep 17 00:00:00 2001 From: Jidbo Date: Fri, 7 Dec 2018 12:22:29 +0100 Subject: [PATCH] add autoinstall of vundle plugins --- setup.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index ad2cadb..c6447a5 100644 --- a/setup.sh +++ b/setup.sh @@ -12,9 +12,19 @@ ln -s ~/.dotfiles/.zshrc ~/.zshrc ln -s ~/.dotfiles/.vim ~/.vim ln -s ~/.dotfiles/tmux.conf ~/.tmux.conf -# install vundle -git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim -# next steps: -# - chage oh-my-zsh home directory -# - install Vundle plugins from inside vim :PluginInstall +# install vundle +if ! [ -d ~/.vim/bundle/Vundle.vim ]; then + echo '[INFO] Installing Vundle...' + git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim +else + echo '[INFO] Vundle is already installed.' +fi + +# Install vundle Plugins +if commandExists vim; then + echo '[INFO] Installing vim plugins via Vundle...' + vim +PluginInstall +qall +else + echo '[INFO] Vim is not installed, could not install the plugins.' +fi