-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-vimprefs
29 lines (23 loc) · 865 Bytes
/
x-vimprefs
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
29
#!/bin/env bash
# Setup/update vim prefs on any box
# Tested on vim 7.4+
VIMRC_URL="https://raw.githubusercontent.com/rfaile313/dotfiles/master/.vimrc-gnu-linux"
COLORSCHEME_URL="https://raw.githubusercontent.com/rfaile313/dotfiles/master/sonokai.vim"
VIM_COLORS_DIR="$HOME/.vim/colors"
echo "Adding latest .vimrc from $VIMRC_URL"
# Just blast the current .vimrc away if we're using this
curl -s $VIMRC_URL > ~/.vimrc
echo "Done."
# Try not to blast existing colors dir
if [ -d "$VIM_COLORS_DIR" ]
then
# Doesn't matter if we override.
echo "Vim colors already exists. Placing inside."
curl -s $COLORSCHEME_URL > "$VIM_COLORS_DIR/sonokai.vim"
else
echo "Directory $VIM_COLORS_DIR does not exist."
echo "Creating and placing inside."
mkdir -pv "$VIM_COLORS_DIR"
curl -s $COLORSCHEME_URL > "$VIM_COLORS_DIR/sonokai.vim"
fi
echo "Done."