From e90a423382a9c1d636ee6c6e05b5ef8b44fc81af Mon Sep 17 00:00:00 2001
From: Joe Taylor and Curtis Steckel <git+joetaylor+steckel@squareup.com>
Date: Tue, 3 Dec 2013 17:22:04 -0800
Subject: [PATCH] you can't maximum awesome without the vim

We've forgot to ensure vim is installed.

Oh, you have vim installed? Does it have clipboard support?

There you go. I just saved you a few hours of stack overflow searches.
---
 Rakefile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Rakefile b/Rakefile
index 96e24ab..bfbe36c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -27,6 +27,16 @@ def step(description)
   puts "\e[32m#{description}\e[0m"
 end
 
+def vim_installed?
+  `which vim`
+  return $?.success?
+end
+
+def vim_has_clipboard_support?
+  `vim --version | grep +clipboard`
+  return $?.success?
+end
+
 def app_path(name)
   path = "/Applications/#{name}.app"
   ["~#{path}", path].each do |full_path|
@@ -126,6 +136,15 @@ namespace :install do
     brew_install 'tmux'
   end
 
+  desc 'Install Vim'
+  task :vim do
+    step 'Vim'
+
+    unless vim_installed? && vim_has_clipboard_support?
+      brew_install 'vim'
+    end
+  end
+
   desc 'Install MacVim'
   task :macvim do
     step 'MacVim'
@@ -171,6 +190,7 @@ task :default do
   Rake::Task['install:ctags'].invoke
   Rake::Task['install:reattach_to_user_namespace'].invoke
   Rake::Task['install:tmux'].invoke
+  Rake::Task['install:vim'].invoke
   Rake::Task['install:macvim'].invoke
 
   # TODO install gem ctags?
-- 
GitLab