-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·36 lines (30 loc) · 899 Bytes
/
setup.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
#!/bin/zsh
set -e
set -x
mkdir -p .vim
dotfiles=( .gitconfig .gitignore_global .tmux.conf .vim .vimrc .zshrc )
#for file in ${dotfiles[@]}
#do
# if [ -e ~/$file ] || [ -L ~/$file ]; then
# mv -i ~/$file ~/$file.bak
# fi
# ln -s $PWD/$file ~/$file
#done
# Set up neovim
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
if [ ! -e $XDG_CONFIG_HOME/nvim ] && [ ! -L $XDG_CONFIG_HOME/nvim ]; then
ln -s ~/.vim $XDG_CONFIG_HOME/nvim
fi
if [ ! -e $XDG_CONFIG_HOME/nvim/init.vim ] && [ ! -L $XDG_CONFIG_HOME/nvim/init.vim ]; then
ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
fi
# Install z.sh
if [ ! -e z ]; then
git clone https://github.com/rupa/z.git
fi
# Get Vundle, then use it to install all other vim plugins
mkdir -p bundle
if [ ! -e bundle/Vundle.vim ]; then
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
vim +PluginInstall +qall