Skip to content

Instantly share code, notes, and snippets.

@tjmgregory
Last active December 4, 2020 16:33
Show Gist options
  • Save tjmgregory/ef6f4f6e3c09b26a8cdacb2895e39c18 to your computer and use it in GitHub Desktop.
Save tjmgregory/ef6f4f6e3c09b26a8cdacb2895e39c18 to your computer and use it in GitHub Desktop.
Clones/pulls all Vim plugins that I use across computers.
#!/bin/bash
VIM_PACKAGE_ARG=${1:-theodored}
declare -a Projects=("https://github.com/jiangmiao/auto-pairs" "https://github.com/preservim/nerdtree" "https://github.com/tpope/vim-fugitive" "https://github.com/fatih/vim-go" "https://github.com/neoclide/coc.nvim" "https://github.com/leafgarland/typescript-vim" "https://github.com/pangloss/vim-javascript" "https://github.com/MaxMEllon/vim-jsx-pretty")
PACK_PATH=~/.vim/pack/$VIM_PACKAGE_ARG/start
if [ ! -d $PACK_PATH ]
then
mkdir $PACK_PATH
echo "Created the vim package collection $PACK_PATH"
fi
for project in ${Projects[@]}
do
PACKAGE_NAME=$(basename $project)
PACKAGE_PATH=$PACK_PATH/$PACKAGE_NAME
if [ -d $PACKAGE_PATH ]
then
echo "Package $PACKAGE_PATH already exists; updating."
git -C $PACKAGE_PATH pull --no-rebase
else
echo "Package $PACKAGE_PATH doesn't exist; cloning."
git clone $project $PACKAGE_PATH
fi
done
echo "Sync complete."
@tjmgregory
Copy link
Author

This has been sunset, and have opted for an easier to maintain (and just as easy to setup) solution here: https://github.com/tjmgregory/.vim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment