Skip to content

Instantly share code, notes, and snippets.

@wm
Last active December 25, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wm/6921431 to your computer and use it in GitHub Desktop.
Save wm/6921431 to your computer and use it in GitHub Desktop.
let g:zeus_prefix = ""
let g:bundle_prefix = ""
let g:fdoc_prefix = ""
" Toggle the rspec_command
function! ToggleRspecCommand(prefix_name, prefix)
if g:{a:prefix_name}_prefix != ""
let g:{a:prefix_name}_prefix = ""
else
let g:{a:prefix_name}_prefix = a:prefix . " "
endif
let g:rspec_command = "!" . g:fdoc_prefix . g:zeus_prefix . g:bundle_prefix ."rspec {spec}"
echo "rspec_command = " . g:rspec_command
endfunction
map <Leader>z :call ToggleRspecCommand("zeus", "zeus")<cr>
map <Leader>b :call ToggleRspecCommand("bundle", "bundle exec")<cr>
map <Leader>f :call ToggleRspecCommand("fdoc", "FDOC_SCAFFOLD=true")<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment