Last active
July 30, 2017 00:00
-
-
Save alecthegeek/54d2ee1b4476d097d9c4728d86d983de to your computer and use it in GitHub Desktop.
Install Vim 8 packages from URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install a Vim package using Vim 8 package directory | |
# Specify package URL on command line as $1 | |
# See also https://shapeshed.com/vim-packages/ | |
# NB If installing Vim via Homebrew in MacOS, then use `brew install macvim`, do not use cask | |
REPO=${1:?Must provide package repo uri} | |
git ls-remote $REPO > /dev/null 2>&1 || (echo Invalid remote repo $REPO && exit 1) | |
i=${REPO##*/} | |
PACKAGE=${i%%\.git} | |
git clone $1 ~/.vim/pack/tools/start/$PACKAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
for i in $(find ~/.vim/pack/tools/start/* -maxdepth 0 -type d) ; do (cd $i && git pull ) ;done | |
# If You Complete Me is installed then run the installer | |
cd ~/.vim/pack/tools/start/YouCompleteMe && ./install.py -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment