-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.sh
executable file
·53 lines (48 loc) · 1.12 KB
/
setup.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
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
CONFIGDIR=~/.vim
SWAPDIR=$CONFIGDIR/.swap
BUNDLEDIR=$CONFIGDIR/bundle
SOURCEDIR=$CONFIGDIR/zztztt-config
mkdir -p $CONFIGDIR
mkdir -p $SWAPDIR
mkdir -p $BUNDLEDIR
download()
{
#install source
echo "==> install zztztt vim-config..."
git clone git@github.com:zztztt/vim-config.git $SOURCEDIR
#install vundle
echo "==> install vundle..."
git clone https://github.com/gmarik/Vundle.vim.git $BUNDLEDIR/Vundle.vim
#install the plugins
echo "==> install vundle plugins..."
cp $SOURCEDIR/bundle.vim $CONFIGDIR/bundle.vim
vim -u $CONFIGDIR/bundle.vim +BundleInstall +qall
}
flag=false
while true
do
read -p "==> Downloading vim config files of zztztt's Github (Y/N)?" input
case $input in
Y|y)
flag=true
download
;;
N|n)
;;
*)
;;
esac
if $flag
then
break
fi
done
echo "==> Copy $SOURCEDIR/vimrc ~/.vimrc"
cp $SOURCEDIR/vimrc ~/.vimrc
echo "==> Romove $SOURCEDIR"
rm -rf $SOURCEDIR
echo "==> Copy YCM general configuration files."
echo "You need to compile YouCompleteMe. Install cmake first, then run"
echo ' cd ~/.vim/bundle/YouCompleteMe'
echo ' ./install.sh --clang-completer'