From 745e6b6b46ffd92649a91b5a5360ca000b130e15 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Wed, 24 Dec 2014 17:15:31 -0800 Subject: [PATCH] Move Vim files to separate repo This removes the Vim plugins from the dotfiles repo, and updates the vimrc and install scripts accordingly, since the vimfiles repo now uses Git submodules to keep the plugins in sync. --- install | 143 ++++------------------------- vim/ftdetect/markdown.vim | 6 -- vim/ftdetect/swig.vim | 6 -- vim/ftplugin/changelog.vim | 10 -- vim/ftplugin/make.vim | 10 -- vim/ftplugin/markdown.vim | 6 -- vim/ftplugin/perl.vim | 21 ----- vim/ftplugin/ruby.vim | 10 -- vim/plugin/airline-settings.vim | 10 -- vim/plugin/bufferline-settings.vim | 11 --- vim/plugin/long-lines.vim | 27 ------ vim/plugin/match-brackets.vim | 40 -------- vim/plugin/nerdtree-settings.vim | 8 -- vim/plugin/ultisnips-settings.vim | 16 ---- vimrc | 92 +------------------ 15 files changed, 18 insertions(+), 398 deletions(-) delete mode 100644 vim/ftdetect/markdown.vim delete mode 100644 vim/ftdetect/swig.vim delete mode 100644 vim/ftplugin/changelog.vim delete mode 100644 vim/ftplugin/make.vim delete mode 100644 vim/ftplugin/markdown.vim delete mode 100644 vim/ftplugin/perl.vim delete mode 100644 vim/ftplugin/ruby.vim delete mode 100644 vim/plugin/airline-settings.vim delete mode 100644 vim/plugin/bufferline-settings.vim delete mode 100644 vim/plugin/long-lines.vim delete mode 100644 vim/plugin/match-brackets.vim delete mode 100644 vim/plugin/nerdtree-settings.vim delete mode 100644 vim/plugin/ultisnips-settings.vim diff --git a/install b/install index 5a6bea5..d1fcfc3 100755 --- a/install +++ b/install @@ -94,88 +94,12 @@ lnfile() fi } -# Install/update vim bundles -vim_update_bundle() -{ - BUNDLE=$(echo $1 | sed 's:^.*/::' | sed 's:\.git$::') - # If the bundle already exists, update it (if possible) - if [[ -d "$HOME/.vim/bundle/$BUNDLE" ]] - then - # Don't update the bundle if BUNDLE_NO_UPDATE is set - if [[ -d "$HOME/.vim/bundle/$BUNDLE/.git" ]] - then - if [[ -z $BUNDLE_NO_UPDATE ]]; then - echo "Updating bundle $BUNDLE..." - pushd "$HOME/.vim/bundle/$BUNDLE" >/dev/null - git pull - popd >/dev/null - echo - fi - else - echo "$BUNDLE is not a Git repository. Skipping update." - fi - else - echo "Installing bundle $BUNDLE..." - pushd "$HOME/.vim/bundle/" >/dev/null - git clone $1 - popd >/dev/null - echo - fi -} - -# Wrapper to vim_update_bundle -# Let's you specify the bundle repo in a short form if it resides on GitHub -# (and perhaps one of the repos in vim-scripts). You can still specify a full -# URL if necessary. However, that will not allow you to dynamically choose a -# transport layer at runtime -Bundle() -{ - # Get the prefix ready - if [[ "$BUNDLE_TRANSPORT" == "ssh" ]]; then - # If the user specifies to use ssh as the transport - URL="git@github.com:" - elif [[ "$BUNDLE_TRANSPORT" == "https" ]]; then - # Use https as the transport - URL="https://github.com/" - elif [[ "$BUNDLE_TRANSPORT" == "git" ]]; then - # Use git as the transport - URL="git://github.com/" - else - echo "Invalid transport layer! Aborting!!!" - exit 1 - fi - - # Check the bundle format - if [[ $(echo $1 | grep "^[A-Za-z0-9-]\+\/[A-Za-z0-9._-]\+$") == $1 ]]; then - # Username/repo combo - URL="${URL}${1}.git" - elif [[ $(echo $1 | grep "^[A-Za-z0-9._-]\+$") == $1 ]]; then - # Bare repo name - must be from the vim-scripts user - URL="${URL}vim-scripts/${1}.git" - else - # I don't care, I'm specifying the URL directly - URL=$1 - fi - - vim_update_bundle "$URL" -} - ####################################################################### # Verify command line switches ####################################################################### -while getopts "nht:" OPTION +while getopts "h" OPTION do case "$OPTION" in - n) - echo "Skipping bundle updates" - BUNDLE_NO_UPDATE=1 - ;; - - t) - echo "Using transport $OPTARG" - BUNDLE_TRANSPORT=$OPTARG - ;; - h) echo ' This script installs the dotfiles into various locations using symbolic @@ -183,13 +107,6 @@ links. Options: -------- - -n Will not update existing bundles, but will install new - bundles. - - -t