-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·71 lines (59 loc) · 2.01 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
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Just tested on vim 7.4+
trap exit ERR
mkdir -p ~/.vim/bundle
mkdir -p ~/.vim/colors
mkdir -p ~/.vim/ycm/c
mkdir -p ~/.vim/ycm/cpp
# $1 -> file name to install
install_file() {
dst="$HOME/.$1"
if [ -f "$dst" ]; then
mv "$dst" "$dst.old"
fi
cp $1 $dst
}
install_file vim/bundle/vimrc.vundle
install_file vim/colors/molokai_dark.vim
install_file vim/colors/solarized.vim
install_file vim/ycm/c/.ycm_extra_conf.py
install_file vim/ycm/cpp/.ycm_extra_conf.py
install_file vimrc
# $1 -> git address
update_plugin() {
lk=$1
dr=`echo ${lk%.*} | awk -F "/" '{print $NF}'`
echo "update $dr..."
if [ -d "$dr" ]; then
cd "$dr"
git pull
cd - >/dev/null 2>&1
else
git clone "$lk"
fi
}
cd ~/.vim/bundle
update_plugin https://github.com/gmarik/Vundle.vim.git
update_plugin https://github.com/flazz/vim-colorschemes.git
update_plugin https://github.com/tpope/vim-fugitive.git
update_plugin https://github.com/Valloric/YouCompleteMe.git
update_plugin https://github.com/kien/ctrlp.vim.git
update_plugin https://github.com/scrooloose/nerdtree.git
update_plugin https://github.com/bling/vim-airline.git
update_plugin https://github.com/majutsushi/tagbar.git
update_plugin https://github.com/rking/ag.vim.git
update_plugin https://github.com/Shougo/vimproc.vim.git
update_plugin https://github.com/Shougo/vimshell.vim.git
update_plugin https://github.com/fatih/vim-go.git
update_plugin https://github.com/rust-lang/rust.vim.git
update_plugin https://github.com/rdnetto/YCM-Generator.git
update_plugin https://github.com/octol/vim-cpp-enhanced-highlight.git
update_plugin https://github.com/adwpc/cscopex.git
update_plugin https://github.com/vim-syntastic/syntastic.git
# Install plugins.
vim -u ~/.vimrc -c ":PluginInstall" -c ":q" -c ":q"
(cd ~/.vim/bundle/YouCompleteMe/ && git submodule update --init --recursive \
&& ./install.py --all)
(cd ~/.vim/bundle/vimproc.vim/ && make)
# Install golang binaries tools.
vim -u ~/.vimrc -c ":GoInstallBinaries" -c ":q" /tmp/tmp.go