Last active
August 29, 2015 14:24
-
-
Save NonLogicalDev/5bb92a48ad80388fbd8c to your computer and use it in GitHub Desktop.
VimSuperAutoAwesome
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ################################################--++ | |
| # INSTALL: curl -L https://goo.gl/L7y6vD | bash | |
| ################################################--++ | |
| ################################################ | |
| # IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORT | |
| # ---------------------------------------------- | |
| # This script will nuke your vim directory, but | |
| # It will have it backed up to .vim.bak | |
| ################################################ | |
| main() { | |
| Log0 "Setting up vim" && SetUpVim | |
| Log0 "Further instructions:" | |
| Log1 "1) Fire up vim and type in :PlugInstall" | |
| Log1 " (There will be errors before you do :PlugInstall, thats normal)" | |
| Log1 "2) Restart vim and enjoy =]" | |
| } | |
| SetUpVim() { | |
| Log1 "Backing Up" | |
| ditto ~/.vim ~/.vim.bak | |
| ditto ~/.vimrc ~/.vimrc.bak | |
| Log1 "Deleting Directories" | |
| rm -rf ~/.vim | |
| rm -rf ~/.vimrc | |
| Log1 "Installing Plugin Manager" | |
| curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ | |
| https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| Log1 "Intalling my vimrc file" | |
| curl -fLo ~/.vim/vimrc --create-dirs \ | |
| https://gist.github.com/NonLogicalDev/a8ac2a49c83c517cfdf2/raw | |
| Log1 "Symlinking vimrc to home dirctory" | |
| ln -s ~/.vim/vimrc ~/.vimrc | |
| Log1 "Creating backup directory" | |
| mkdir ~/.vim/backup | |
| } | |
| Log0() { | |
| echo "$(tput setaf 1)>>>>>>>>>>>>> $1 <<<<<<<<<<<<<<<$(tput sgr0)" | |
| } | |
| Log1() { | |
| echo ">>> $(tput setaf 2)$1$(tput sgr0)" | |
| } | |
| define(){ IFS='\n' read -r -d '' ${1} || true; } | |
| main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment