Created
September 7, 2012 14:02
-
-
Save tobynet/3666491 to your computer and use it in GitHub Desktop.
a part of vimrc for ruby bundler with vim-quickrun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim-quickrunで ruby の bundler を考慮する | |
augroup quickrun_ruby_config | |
autocmd! | |
autocmd FileType ruby call s:quickrun_ruby_config() | |
augroup END | |
function! s:quickrun_ruby_config() | |
" detect "bundler" by checking "Gemfile" from upper directory of current file | |
let execs = executable('bundle') && | |
\ findfile('Gemfile', '.;') != '' ? 'bundle exec ' : '' | |
" buffer local setting for quickrun | |
let b:quickrun_config = {'exec': execs . '%c %o %s %a'} | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment