I'm using vim-rspec on a mac with macvim and iterm. I'm using this command to clear the iTerm screen and run the test in iTerm.

let g:rspec_command = "clear && rspec {spec}"
let g:rspec_runner = "os_x_iterm"

I wanted to know what will be the command to interrupt the current process like with Ctrl+c. I've try ^\Quit && clear && rspec {spec} but I get zsh: substitution failed.

Any ideas?

  • 1
    If I understand your question correctly, you would like to stop the rspec process from within Vim. Am I correct? Feb 1, 2016 at 11:04
  • thanks @Carpetsmoker. My rspec test are run in the iTerm window it is a separate one from Macvim. I would like to stop rspec or any process that happen in the iTerm window. Maybe I can run a kill 'rspec_process' && clear && rspec {spec}
    – Mio
    Feb 1, 2016 at 11:26
  • 1
    You can probably use pkill or killall to kill it: e.g. :!pkill rspec. This will kill all rspec processes, but this is probably not an issue. This should also close the terminal window, as the process running inside of it is now finished. You can then restart it by using :call RunAllSpecs() (or one of the other functions) again. Feb 1, 2016 at 14:18
  • Thanks a lot Carpetsmoker. I found an answer and will publish what ?I've found
    – Mio
    Feb 1, 2016 at 14:41
  • 1
    I moved this issue to the github issue of vim-rspec I will post the full answer when I will get it : github.com/thoughtbot/vim-rspec/issues/110
    – Mio
    Feb 1, 2016 at 15:00


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.