-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·28 lines (22 loc) · 1.05 KB
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
set -e
repo_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Linking this repo to the active Vim configuration..."
test -e ~/.vim && echo "~/.vim directory already exists, refusing to continue." && exit
test -e ~/.vimrc && echo "~/.vimrc file exists, refusing to continue." && exit
ln -s $repo_dir ~/.vim && echo "Linked $repo_dir to ~/.vim"
ln -s ~/.vim/vimrc ~/.vimrc && echo "Linked $repo_dir/vimrc to ~/.vimrc"
ln -s ~/.vim/ideavimrc ~/.ideavimrc && echo "Linked $repo_dir/ideavimrc to ~/.ideavimrc"
sleep 3 # let user see what we've done
# download plug.vim (vim-plug)
mkdir -p ~/.vim/plugged
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# Golang is required to exist before installing vim-go
which -s go ||
(echo "golang is required -- 'brew install go' for OSX."; exit 1)
# yarn is required for vim-prettier plugin -- others?
which -s yarn ||
(echo "yarn is required -- 'brew install yarn' for OSX."; exit 1)
# install bundles
vim +PlugInstall +qall