-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
52 lines (44 loc) · 1.17 KB
/
install.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
#!/usr/bin/env bash
#
# Script to install my vimrc
#
# curl -sL https://raw.githubusercontent.com/jolth/vimrc/master/install.sh | bash -
# or
# wget -qO- https://raw.githubusercontent.com/jolth/vimrc/master/install.sh | bash -
#
PWD=$(pwd)
vimrcf=~/.vimrc
vimd=~/.vim
# Configure
#fast saving:
echo -e "bind -r '\C-s'\nstty -ixon" >> ~/.bashrc;source ~/.bashrc
# Check that Git exists
if [ ! -e $(which git) ]; then
echo "Git is required, install please git"
exit 1
fi
if [ -e $vimrcf ]; then
echo ".vimrc file exists"
echo "backup into raw created"
mv ${vimrcf}{,_$(date +'%d%m%y%H%M%S')}
fi
if [ -d $vimd ]; then
echo ".vim directory exist"
echo "backup into raw created"
mv ${vimd}{,_$(date +'%d%m%y%H%M%S')}
fi
# remove if ~/.myvimrc exist
if [ -d ~/.myvimrc ]; then
rm -rf ~/.myvimrc
fi
#rm -rf ~/.vimbackup
# Vundle install
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
# Clone my vimrc
git clone https://github.com/jolth/vimrc.git ~/.myvimrc/
# Configure and Install
ln -s ~/.myvimrc/vimrcs/vimrc ~/.vimrc
#mkdir ~/.vim/{colors,backup}
mkdir -p ~/.vim/dirs/{tmp,backups,undos}
vim +PluginInstall +qall
reset