28 lines
547 B
Bash
Executable File
28 lines
547 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# to be in script folder
|
|
cd $(dirname $0)
|
|
CURRENT_DIR=$(pwd)
|
|
echo "installing vimrc"
|
|
|
|
if [ -f ~/.vimrc ]
|
|
then
|
|
echo "backuping existing ~/.vimrc"
|
|
cp ~/.vimrc ~/.vimrc.bkp
|
|
rm ~/.vimrc
|
|
fi
|
|
echo "Linking ${CURRENT_DIR}/vim/.vimrc"
|
|
ln -s ${CURRENT_DIR}/vim/.vimrc ~/.vimrc
|
|
|
|
if [ ! -f ~/.vim/autoload/plug.vim ]
|
|
then
|
|
echo "installing vim-plug"
|
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
vim -c PlugInstall
|
|
else
|
|
echo "vim-plug already installed"
|
|
fi
|
|
|
|
|