Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Vim bundle installer

  • Loading branch information...
commit 43fd76f36a2ae21371f4c7b18a16a6b7bd9b62df 1 parent 194a00d
@pengwynn authored
View
3  .gitmodules
@@ -138,3 +138,6 @@
[submodule "vim/vim.symlink/bundle/vim-bundler"]
path = vim/vim.symlink/bundle/vim-bundler
url = https://github.com/tpope/vim-bundler.git
+[submodule "vim/vim.symlink/bundle/vim-gitgutter"]
+ path = vim/vim.symlink/bundle/vim-gitgutter
+ url = https://github.com/airblade/vim-gitgutter.git
View
41 script/vim-module
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Install a vim plugin as a git submodule
+command -v hub >/dev/null 2>&1 || { echo >&2 "This command needs hub installed and in PATH. http://defunkt.io/hub"; exit 1; }
+
+set -e
+
+VIM_PLUGINS_PATH="vim/vim.symlink/bundle"
+
+# Gets the command name without path
+cmd(){ echo `basename $0`; }
+
+# Help command output
+usage(){
+echo "\
+`cmd` repository [destination module name]
+
+Install a vim plugin as git submodule
+
+Example: `cmd` tpope/vim-rails
+"
+}
+[ $# -eq 0 ] && {
+ usage
+ exit 1
+}
+
+
+REMOTE_URL="$1"
+
+if [[ -z $2 ]]; then
+ SUBMODULE_PATH="$(echo $1 | cut -d/ -f2-)"
+else
+ SUBMODULE_PATH="$2"
+fi
+
+INSTALL_PATH="$VIM_PLUGINS_PATH/$SUBMODULE_PATH"
+
+echo "Installing $REMOTE_URL to $INSTALL_PATH"
+
+hub submodule add $REMOTE_URL $INSTALL_PATH
1  vim/vim.symlink/bundle/vim-gitgutter
@@ -0,0 +1 @@
+Subproject commit e7247311f526142de8756043fb995fed0475c9f1
Please sign in to comment.
Something went wrong with that request. Please try again.