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:
- https://github.com/mileszs/ack.vim.git
- https://github.com/chriskempson/base16-vim.git
- https://github.com/docunext/closetag.vim.git
- https://github.com/vim-scripts/java.vim.git
- https://github.com/mrtazz/molokai.vim.git
- https://github.com/scrooloose/nerdcommenter.git
- https://github.com/scrooloose/nerdtree.git
- https://github.com/scrooloose/syntastic.git
- https://github.com/majutsushi/tagbar.git
- https://github.com/kchmck/vim-coffee-script.git
- https://github.com/altercation/vim-colors-solarized.git
- https://github.com/tpope/vim-cucumber.git
- https://github.com/xolox/vim-easytags.git
- https://github.com/xolox/vim-misc (is needed for vim-easytags)
- https://github.com/tpope/vim-fugitive.git
- https://github.com/airblade/vim-gitgutter.git
- https://github.com/jcf/vim-latex.git
- https://github.com/plasticboy/vim-markdown.git
- https://github.com/christophwagner/vim-maven.git
- https://github.com/Lokaltog/vim-powerline.git
- https://github.com/tpope/vim-rails.git
- https://github.com/vim-ruby/vim-ruby.git
- https://github.com/othree/xml.vim.git
- https://github.com/mattn/zencoding-vim.git
- https://github.com/tpope/vim-fireplace
Written by Jens Grassel
Related protips
3 Responses
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
@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
@hauleth: I also do most stuff via :e
but if you have a bloated project source tree the NERDtree can come in quite handy.