forked from mdouchement/dotfiles-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vim_installer.sh
executable file
·58 lines (46 loc) · 1.25 KB
/
vim_installer.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
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pause() {
echo 'Push ENTER to continue'
read
}
echo 'Install vim on your machine'
echo ' Ubuntu: apt-get install tmux'
echo 'Install vim on your machine'
echo ' Ubuntu: apt-get install vim'
pause
echo 'Create symbolic links for tmux'
if [ ! -f ~/.tmux.conf ]
then
ln -s $DIR/.tmux.conf ~/.tmux.conf
else
echo ' ~/.tmux.conf already exists'
fi
echo 'Restore vertical split in Tmux if Byobu is used'
if [ -f ~/.byobu/keybindings.tmux ] && [ $(grep -c -F "bind '\"' split-window -c '#{pane_current_path}' -v" ~/.byobu/keybindings.tmux) -eq 0 ]
then
echo "bind '\"' split-window -c '#{pane_current_path}' -v" >> ~/.byobu/keybindings.tmux
else
echo ' ~/.byobu/keybindings.tmux does not exist or binding is already setted'
fi
echo 'Create symbolic links for vimrc & plugins'
if [ ! -f ~/.vimrc ]
then
ln -s $DIR/.vimrc ~/.vimrc
else
echo ' ~/.vimrc already exists'
fi
if [ ! -d ~/.vim/rcfiles ]
then
ln -s $DIR/vim/rcfiles ~/.vim/rcfiles
else
echo ' ~/.vim/rcfiles already exists'
fi
if [ ! -d ~/.vim/rcplugins ]
then
ln -s $DIR/vim/rcplugins ~/.vim/rcplugins
else
echo ' ~/.vim/rcplugins already exists'
fi
# ln -s $DIR/vim/snippets ~/.vim/snippets
# ln -s $DIR/bin/* ~/.bin/*