Skip to content

Instantly share code, notes, and snippets.

@alecthegeek
Last active July 30, 2017 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alecthegeek/54d2ee1b4476d097d9c4728d86d983de to your computer and use it in GitHub Desktop.
Save alecthegeek/54d2ee1b4476d097d9c4728d86d983de to your computer and use it in GitHub Desktop.
Install Vim 8 packages from URL
#!/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
#!/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