forked from barretlee/autoconfig-mac-vimrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
59 lines (46 loc) · 1.58 KB
/
install
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
# @author Barret Lee<[email protected]>
[[ -d ~/.vim ]] || mkdir ~/.vim;
# tmp dir
[[ -d ~/v-tmp ]] || mkdir ~/v-tmp;
# .vimrc
cd ~/v-tmp;
[[ -d ~/v-tmp/rc ]] || git clone https://github.com/barretlee/autoconfig-mac-vimrc.git;
# backup origin vimrc file
[[ -f ~/.vimrc-bak ]] || cp ~/.vimrc ~/.vimrc-bak;
mv ~/v-tmp/autoconfig-mac-vimrc/.vimrc ~/.vimrc;
# vim pulgin controller - vundle
[[ -d ~/.vim/bundle/Vundle.vim ]] || git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim;
# colors schemes
cd ~/v-tmp;
[[ -d ~/v-tmp/vim-colorschemes ]] || git clone https://github.com/flazz/vim-colorschemes.git;
[[ -d ~/.vim/colors ]] || mv ~/v-tmp/vim-colorschemes/colors ~/.vim/;
# fonts for airline
cd ~/v-tmp;
[[ -d ~/v-tmp/fonts ]] || git clone https://github.com/powerline/fonts.git;
cd fonts;
sh ./install.sh;
if type brew > /dev/null; then
echo "Homebrew Exists";
else
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
fi;
# ack supported
brew install ack ag;
# YouCompleteMe supported
if [[ -d ~/.vim/bundle/YouCompleteMe ]]; then
echo "YouCompleteMe Exists";
else
git clone https://github.com/Valloric/YouCompleteMe.git ~/.vim/bundle/YouCompleteMe;
cd ~/.vim/bundle/YouCompleteMe;
git submodule update --init --recursive
# for nodejs
./install.py --tern-completer;
fi;
# update vim, replace the origin
# brew install vim --override-system-vi --with-lua --HEAD;
# install vim plugins
vim +PluginInstall! +qall;
# rm tmp dir
rm -rf ~/v-tmp;
# echo "You can remove the temporary directory ~/v-tmp";