From 90b522ecd53ef3c919d25fa75681bb010b0205da Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Sat, 27 Jul 2019 04:23:09 -0400 Subject: [PATCH] Added a basic vim-configure script, for pulling this repo and applying vim configuration easily. --- scripts/vim-configure.sh | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 scripts/vim-configure.sh diff --git a/scripts/vim-configure.sh b/scripts/vim-configure.sh new file mode 100755 index 0000000..78f7264 --- /dev/null +++ b/scripts/vim-configure.sh @@ -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 +