Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
Add Zsh vimupg function to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Jun 2, 2015
1 parent f9cfb39 commit d09150b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,32 @@ $ vim -c NeoBundleInstall -c quitall
$ vim -c NeoBundleClean! -c quitall
```

Here is an example of a Zsh function that will provide a one-step update:

```zsh
# Upgrade vimrc.
function vimupg () {
if ! [[ -d $HOME/.vim/bundle/neobundle.vim ]]; then
echo 'NeoBundle is not installed.'
return 1
fi

vimrc=$HOME/.vimrc

vim -N -u $vimrc -c \
"try | NeoBundleUpdate $* | finally | qall! | endtry" \
-U NONE -i NONE -V1 -e -s

vim -N -u $vimrc -c \
"try | NeoBundleInstall $* | finally | qall! | endtry" \
-U NONE -i NONE -V1 -e -s

vim -N -u $vimrc -c \
"try | NeoBundleClean! $* | finally | qall! | endtry" \
-U NONE -i NONE -V1 -e -s
}
```

## Customization

You can customize this configuration or manage your own in the same way.
Expand Down

0 comments on commit d09150b

Please sign in to comment.