-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvim-installer.sh
executable file
·48 lines (36 loc) · 1.04 KB
/
vim-installer.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
TMP_DIR="/tmp/darcula_vim"
# .vim directory
if [ ! -d ~/.vim ]; then
mkdir -p ~/.vim
echo "Created ~/.vim/"
fi
# Colors
if [ ! -d ~/.vim/colors ]; then
mkdir -p ~/.vim/colors
echo "Created ~/.vim/colors/"
fi
echo "Cloning Blueshirts/darcula to $TMP_DIR"
git clone https://github.com/blueshirts/darcula.git $TMP_DIR
cp $TMP_DIR/colors/darcula.vim ~/.vim/colors/
echo "Copied darcular.vim to ~/.vim/colors/"
rm -r $TMP_DIR
# vimrc and vundle
if [[ "$1" == "plugins" ]]; then
cp .vimrc ~/.vimrc
echo "Copied .vimrc to ~/.vimrc"
# Install Vundle
if [ -d ~/.vim/bundle ]; then
echo "~/.vim/bundle already exists ... not intalling"
vim +BundleInstall +q
fi
if [ ! -d ~/.vim/bundle ]; then
echo "No bundle dir exists at ~/.vim/bundle, installing vundle..."
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim &&
vim -c BundleInstall! -c quitall!
fi
else
cp .vimrc_no_plugins ~/.vimrc
echo "Copied .vimrc_no_plugins to ~/.vimrc"
fi
echo "-DONE-"