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.

36 lines
754 B

#!/bin/bash
VIM_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
LOCALVIMRC="$VIM_SCRIPT_DIR/../../dotfiles/vim/.vimrc"
echo "VIM dotfile $DOTFILE_DIR"
VIMRC="/home/$USER/.vimrc"
VIMDIR="/home/$USER"
CURDATE=$(date +%m%d%Y%H%M%S)
echo $CURDATE
install_vim()
{
graphics_install_prompt "Vim Will be installed"
install_from_repo "vim"
if [ -f $VIMRC ];
then
echo Backing the old config file with the current date
cp $VIMRC "$VIMRC"."$CURDATE"
cp $LOCALVIMRC $VIMDIR
else
cp $LOCALVIMRC $VIMDIR
fi
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
graphics_install_prompt "Vim installation complete"
vim -c "PlugInstall | q | q"
}