You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
550 B
30 lines
550 B
#!/bin/bash
|
|
|
|
source common.sh
|
|
|
|
LOCALVIMRC="$main_dir/dotfiles/vim/init.vim"
|
|
|
|
VIMRC="/home/$USER/.vimrc"
|
|
VIMDIR="/home/$USER/"
|
|
|
|
CURDATE=$(date +%m%d%Y%H%M%S)
|
|
|
|
echo $CURDATE
|
|
|
|
echo Installing VIM
|
|
|
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
|
|
|
if [ -f $VIMRC ];
|
|
then
|
|
echo Backing the old config file with the current date
|
|
cp $VIMRC "$VIMRC"."$CURDATE"
|
|
cp $LOCALVIMRC $VIMDIR
|
|
cd $VIMDIR
|
|
mv $LOCALVIMRC .vimrc
|
|
else
|
|
cp $LOCALVIMRC $VIMDIR
|
|
cd $VIMDIR
|
|
mv $LOCALVIMRC .vimrc
|
|
fi
|