Added a basic vim-configure script, for pulling this repo and applying vim configuration easily.

This commit is contained in:
Shaun Reed 2019-07-27 04:23:09 -04:00
parent 602c762363
commit 90b522ecd5
1 changed files with 49 additions and 0 deletions

49
scripts/vim-configure.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
## Author: Shaun Reed | Contact: shaunrd0@gmail.com | URL: www.shaunreed.com ##
## A custom bash script for building cmake projects. ##
## Intended to be ran in root directory of the project alongside CMakeLists ##
###############################################################################
printf "\nEnter 1 to configure, 2 to revert configuration."
printf "\nAny other value will exit."
printf "\nConfiguring Vim will overwrite your current ~/.vimrc!\n"
read cChoice
if [ $cChoice -eq 1 ] ; then
# Clone klips repository -
git clone https://github.com/shaunrd0/klips temp/
# Clean up files we don't need from the repo
mkdir config-vim
mv temp/README.md config-vim/ && mv temp/configs/ config-vim/
rm -R temp/
# Replace our .vimrc in the home directory
mkdir config-vim/backup/
mv -f ~/.vimrc config-vim/backup/.vimrc.bak
cp config-vim/configs/.vimrc ~/
# Reinstall Pathogen plugin manager for vim
# https://github.com/tpope/vim-pathogen
# Remove Pathogen
rm ~/.vim/autoload/pathogen.vim
# Install Pathogen
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
# Remove all plugins / repositories added by config tool
rm -R ~/.vim/bundles/supertab/
# clone all repos into pathogen plugin directory
(cd ~/.vim/bundles/ && \
git clone https://github.com/ervandew/supertab)
else
printf "\nExiting..\n"
fi