Skip to content

Instantly share code, notes, and snippets.

@yock
Last active August 29, 2015 14:11
Show Gist options
  • Save yock/e3f16147f5172a2e349f to your computer and use it in GitHub Desktop.
Save yock/e3f16147f5172a2e349f to your computer and use it in GitHub Desktop.
vundle_outdated() {
local -a outdated
for plugin in `find ~/.vim/bundle -maxdepth 1 -d 1`;
do
cd $plugin;
current=`git status | grep -c "Your branch is up-to-date with"`;
if [[ current -eq 0 ]] {
outdated+=$plugin;
}
cd ..;
done
if [[ ${#outdated} -gt 0 ]] {
echo $outdated
}
}
vundle_alert_if_outdated() {
local outdated
outdated=vundle_outdated
if ! [[ -n $outdated ]] {
echo "You have outdated packages in Vim. Run 'vundle-update to get current."
}
}
alias vundle-update="vim +PluginUpdate +qall"
vundle_alert_if_outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment