I'm using Emacs at the moment and experimenting with it for my Rails development and there is one thing that I do quite regularly in Vim and I'd like to know if an equivalent exists in Emacs, or an alternative workflow to achieve the behavior that I need.
The command in Vim is
:map ;t :!rspec --no-color %<cr>
Essentially this maps a key combination to run a bash/shell command on the file represented by the current buffer (% expands to the filename at runtime, the <cr> is just a carriage return at the end to execute the command).
I map all sorts of random little commands as and when I need them and I really miss the immediacy of this approach.
How can I achieve something similar?
rspec --no-color spec/some_spec.rb. I love the look ofshell-command-on-regionthough – I can definitely see where that would fit in my workflow – eightbitraptor Nov 22 '11 at 21:31