-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_nvim.sh
46 lines (39 loc) · 946 Bytes
/
setup_nvim.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
#!/usr/bin/env bash
# to bootstrap vim really quickly...
# by evilroot
# check if curl or wget is available
if which wget >/dev/null 2>&1;
then
COMMAND=wget
elif which curl >/dev/null 2>&1;
then
COMMAND=curl
else
echo 'No wget or curl installed - exiting...'
exit 1
fi
# check if we have git
if ! which git >/dev/null 2>&1;
then
echo 'git is not installed - exiting...'
exit 1
fi
# check if we have nvim
if ! which nvim >/dev/null 2>&1;
then
echo 'neovim is not installed - exiting...'
exit 1
fi
# backup old vim
if [ -e ~/.vimrc ]; then
mv ~/.vimrc ~/.vimrc-old
fi
if [ -e ~/.vim ]; then
mv ~/.vim ~/.vim-old
fi
$COMMAND https://raw.githubusercontent.com/evilr00t/dotfiles/master/.vimrc -O ~/.vimrc
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
ln -s ~/.vim $XDG_CONFIG_HOME/nvim
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
nvim +PluginInstall +qall