thoughtbot / vim-rspec

Run Rspec specs from Vim
https://robots.thoughtbot.com
MIT License
656 stars 108 forks source link

iTerm does not foreground when running specs #96

Closed toothrot closed 9 years ago

toothrot commented 9 years ago

Environment: iTerm2 Build 2.1.1 MacVim 7.4 (75) OS X 10.10.3 let g:rspec_runner = "os_x_iterm"

When activating iTerm2 for running specs, the command is populated and executed in iTerm, but the window only flashes active into the foreground before being backgrounded again. Is that a limitation of AppleScript?

I'm not an expert in Vim plugins, but this article may be useful https://apple.stackexchange.com/questions/58355/how-can-i-bring-a-window-to-frontmost-without-focusing-it-using-applescript-in-o

gylaz commented 9 years ago

This is the desired behavior. The assumption is that the terminal is visible at the same time as MacVim -- therefore running tests does not interrupt the vim flow.

toothrot commented 9 years ago

@gylaz I forgot to say thanks for making such a great plugin!

Is there a way to make that configurable?

gylaz commented 9 years ago

Is there a way to make that configurable?

Unfortunately, no. No current plans to support that.

toothrot commented 9 years ago

Cool! I'll just maintain a fork. If you ever change your mind, here's a helpful commit. I need this for my tiny, tiny monitor where I can't keep two windows open.

https://github.com/toothrot/vim-rspec/commit/6a064528562bd1b7fdc8afc4e98e8ff8ec546198

Have a great day