Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Does what it sounds like. Opens a gem in a new tab,
- " getting the location from 'bundle show <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>)
Add Comment
Please, Sign In to add comment