-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall-vim-configuration.sh
executable file
·67 lines (57 loc) · 1.54 KB
/
install-vim-configuration.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##!/bin/bash -xv
set -Eeuo pipefail
echo "Installing vim awesome..."
echo "Copy .vimrc"
cp ./vim/vimrc ~/.vimrc
if [ ! -d ~/.vim/bundle/Vundle.vim/ ]
then
echo "Copy .vim/"
if [ ! -d ~/.vim/ ]
then
mkdir ~/.vim/
fi
if [ ! -d ~/.vim/bundle/ ]
then
mkdir ~/.vim/bundle/
fi
cp -R ./vim/bundle/* ~/.vim/bundle/
fi
echo "Copy colors"
if [ ! -d ~/.vim/colors/ ]
then
mkdir ~/.vim/colors/
fi
cp ./vim/vim-colors-solarized/colors/solarized.vim ~/.vim/colors/
echo "Install plugins"
vim +PluginInstall +qall
echo "Clean plugins"
vim +PluginClean +qall
echo "Install powerline fonts"
./other/fonts/install.sh
echo "Installing tmux plugin manager"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "Copy .tmux.conf"
if [ ! -f ~/.tmux.conf ]
then
cp ./other/tmux.conf ~/.tmux.conf
else
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' '/# ----- Begin vim-awesome -----/,/# ----- End vim-awesome -----/ d' ~/.tmux.conf
else
sed -i '/# ----- Begin vim-awesome -----/,/# ----- End vim-awesome -----/ d' ~/.tmux.conf
fi
cat ./other/tmux.conf >> ~/.tmux.conf
fi
echo "Copy .zshrc"
if [ ! -f ~/.zshrc ]
then
cp ./other/zshrc ~/.zshrc
else
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' '/# ----- Begin vim-awesome -----/,/# ----- End vim-awesome -----/ d' ~/.zshrc
else
sed -i '/# ----- Begin vim-awesome -----/,/# ----- End vim-awesome -----/ d' ~/.zshrc
fi
cat ./other/zshrc >> ~/.zshrc
fi
echo "----- Successfully installed ------"