" Run RSpec examples.
" Loosely inspired by: https://gist.github.com/1062296
function! RunSpec(args)
let cmd = "bundle exec rspec " . a:args . " " . @%
execute ":! echo " . cmd . " && " . cmd
endfunction
map <silent> <leader>r :call RunSpec("")<CR>
map <silent> <leader>re :call RunSpec("-fn -l " . line('.'))<CR>
Para esta e outras configurações do Vim, verifique meus dotfiles .