-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_vim_config.sh
More file actions
executable file
·43 lines (37 loc) · 947 Bytes
/
setup_vim_config.sh
File metadata and controls
executable file
·43 lines (37 loc) · 947 Bytes
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
#!/bin/sh
echo "============================"
echo "Setting up Vim configuration"
echo "============================"
echo "1) Checking if ~/.vim folder is already present"
vimdir=~/.vim
if [ -d "$vimdir" ]; then
echo " ~/.vim already present. Quiting."
exit 1
fi
echo "done"
echo "2) Checking if ~/.vimrc is already present"
vimrc=~/.vimrc
if [ -f "$vimrc" ]; then
echo " ~/.vimrc already present. Quiting."
exit 1
fi
echo "done"
echo "3) Linking Dotfiles/vim to ~/.vim"
tolinkvimdir=$PWD/vim
ln -s $tolinkvimdir $vimdir
if [ $? -ne 0 ]; then
echo " Error linking Dotfiles/vim to ~/.vim"
exit 1
fi
echo "done"
echo "4) Linking Dotfiles/vimrc to ~/.vimrc"
tolinkvimrc=$PWD/vimrc
ln -s $tolinkvimrc $vimrc
if [ $? -ne 0 ]; then
echo " Error linking Dotfiles/vimrc to ~/.vimrc"
exit 1
fi
echo "done"
echo "================================="
echo "Done setting up Vim configuration"
echo "================================="