Skip to content

Commit

Permalink
Add vim plugin installer
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Apr 26, 2015
1 parent 5cb5627 commit 1eb96fe
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions bin/tpope
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,47 @@ EOF
done
;;

vimclone)
case "$1" in
*://*|*@*)
repo="$1"
;;
*/*)
repo="git://github.com/$1.git"
;;
*)
repo="git@github.com:tpope/$1.git"
;;
esac
case "$repo" in
*@*)
dest="$HOME/src/vim/bundle"
;;
*/*)
dest="$HOME/src/vim/vendor"
;;
esac
mkdir -p "$dest"
cd "$dest"
basename=`basename "$repo" .git`
if [ -d $basename ]; then
cd $basename
git pull --rebase
else
git clone "$repo" || exit 1
cd ./$basename
for server in $(vim --serverlist); do
vim --servername "$server" --remote-expr "pathogen#surround('$PWD')" >/dev/null
vim --servername "$server" --remote-expr "pathogen#execute('filetype off', 'filetype on')"
vim --servername "$server" --remote-expr "call('pathogen#execute', map(split(glob('$PWD/plugin/**.vim'), \"\n\"), '\"source \".v:val'))"
done
fi
echo $PWD
if [ -d doc ]; then
vim -u NONE -c'helptags doc' -cq >/dev/null 2>&1 </dev/null
fi
;;

whois)
[ -d /private ] || args=-H
if [ "$1" != "-H" -a -t 1 ]; then
Expand Down

0 comments on commit 1eb96fe

Please sign in to comment.