From 0901fc6e106af2812ac9c60a655c3bf972b65a3a Mon Sep 17 00:00:00 2001 From: saibotk Date: Fri, 7 Dec 2018 01:32:33 +0100 Subject: [PATCH] Automaticially install vim plugins | More informations in the setup --- setup.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 75dece3..9a35e1d 100755 --- a/setup.sh +++ b/setup.sh @@ -6,6 +6,7 @@ commandExists() } # remove all current dotfiles +echo '[INFO] Removing current dotfiles...' rm -f ~/.zshrc rm -f ~/.vimrc rm -rf ~/.vim @@ -13,6 +14,7 @@ rm -f ~/.tmux.conf rm -rf ~/.atom # create symbolic links to dotfiles +echo '[INFO] Creating symlinks to new config files in .dotfiles...' ln -s ~/.dotfiles/.vimrc ~/.vimrc ln -s ~/.dotfiles/.zshrc ~/.zshrc ln -s ~/.dotfiles/.vim ~/.vim @@ -21,17 +23,27 @@ ln -s ~/.dotfiles/.atom ~/.atom # 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 + +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 + # if atom is installed import configs if commandExists atom; then if commandExists apm; then if [ -f ~/.dotfiles/.atom/packages.list ]; then + echo '[INFO] Installing atom packages, this can take a while...' apm install --packages-file ~/.dotfiles/.atom/packages.list else - echo '[INFO] Cannot find packages.txt skipping atom package installation.' + echo '[INFO] Cannot find packages.list skipping atom package installation.' fi else echo '[INFO] Atom is installed but the apm command is not available. Cannot import atom packages!' @@ -41,5 +53,4 @@ else fi # next steps: -# - install Vundle plugins from inside vim :PluginInstall # - backup config files first before removing them