Skip to content

Instantly share code, notes, and snippets.

@granolocks
Created March 20, 2012 19:50
Show Gist options
  • Save granolocks/2140549 to your computer and use it in GitHub Desktop.
Save granolocks/2140549 to your computer and use it in GitHub Desktop.
Useful Keymappings
" bind \f to run rspec on current file
:map \f :w\|!rspec %<cr>
" bind \l to run rspec on current line
:map \l :w\|:exe "!rspec % -l " . line('.')<cr>
" bind \w to run rspec on current file
" this one kind of sucks...
:map \w :w\|:exe "!rspec % -e " . expand("<cword>")<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment