Last Updated: February 25, 2016
·
1.657K
· jan0sch

Script to update vim pathogen and bundles

Because I use the execelent pathogen plugin for vim, I wrote a small script to update it and the bundles I use:

#!/usr/bin/env zsh

which curl >/dev/null || {
  echo "curl not found in path..."
  exit 1
}
which git >/dev/null || {
  echo "git not found in path..."
  exit 1
}

PATHOGEN_DIR="${HOME}/.vim/autoload"
BUNDLES_DIR="${HOME}/.vim/bundle"

if [[ -d "${PATHOGEN_DIR}" ]]; then
  echo "Updating pathogen..."
  curl -Sso "${PATHOGEN_DIR}/pathogen.vim" \
    https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
fi

if [[ -d "${BUNDLES_DIR}" ]]; then
  echo "Updating bundles..."
  for bundle in "${BUNDLES_DIR}/"*; do
    if [[ -d "${bundle}/.git" ]]; then
      echo "Bundle: ${bundle}..."
      cd "${bundle}"
      git pull
    fi
  done
fi

Here is a list of bundles I find useful:

3 Responses
Add your response

I used git submodules to update my vim plugins in the past, but after discovering Vundle there was no need for that anymore. I highly recommend you look over https://github.com/gmarik/vundle

over 1 year ago ·

@limpangel: I used Vundle for some time, but I cannot get along with it so I switched to Pathogen. But using submodules is really awesome idea.

Also I don't like and don't recommend installing NERDtree. There is no usage of this (you can use built in :e dir command) and only confuse user. My own configuration (and come other confs also) can be found at https://github.com/hauleth/dotfiles

over 1 year ago ·

@hauleth: I also do most stuff via :e but if you have a bloated project source tree the NERDtree can come in quite handy.

over 1 year ago ·