Permalink
Browse files

Add Bernerd's BO

  • Loading branch information...
1 parent b565969 commit 0827af784a9a0613f2d1ff84deb08159de0775d9 Joshua Davey and Veezus Kreist committed with Hashrocket Workstation Apr 28, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 .vim/plugin/hashrocket.vim
View
@@ -160,6 +160,20 @@ if !exists('g:syntax_on')
endif
filetype plugin indent on
+" Bundle Open command, from Bernerd Schaefer
+" Call with :BO <gemname>
+function! s:BundleOpen(Gem) abort
+ let path = system('bundle show '.a:Gem)
+ if v:shell_error != 0
+ echo 'failed to run command'
+ else
+ exe 'tabedit '.substitute(path, '\v\C\n$', '', '') | :lcd %
+ endif
+endfunction
+
+" :BO capybara
+:command! -nargs=1 BO :call s:BundleOpen(<q-args>)
+
augroup hashrocket
autocmd!

0 comments on commit 0827af7

Please sign in to comment.