forked from mdouchement/dotfiles-old
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nvim_installer.sh
executable file
·56 lines (44 loc) · 1.22 KB
/
nvim_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
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
pause() {
echo 'Push ENTER to continue'
read
}
echo 'Install neovim on your machine'
echo ' https://github.com/neovim/neovim/wiki/Installing'
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 nvimrc & plugins'
if [ ! -f ~/.nvimrc ]
then
ln -s $DIR/.nvimrc ~/.nvimrc
else
echo ' ~/.nvimrc already exists'
fi
if [ ! -d ~/.nvim/rcfiles ]
then
ln -s $DIR/vim/rcfiles ~/.nvim/rcfiles
else
echo ' ~/.nvim/rcfiles already exists'
fi
if [ ! -d ~/.nvim/rcplugins ]
then
ln -s $DIR/vim/rcplugins ~/.nvim/rcplugins
else
echo ' ~/.nvim/rcplugins already exists'
fi
# ln -s $DIR/vim/snippets ~/.vim/snippets
# ln -s $DIR/bin/* ~/.bin/*