Monday, December 12, 2011

Re: run shell command, launch app, but keep focus

On 12/12/11 15:42, Alejandro Exojo wrote:
> El Lunes, 12 de diciembre de 2011, Chris Lott escribió:
>> I have the following command mapped for previewing markdown as HTML:
>> silent !pandoc -f markdown -t html -s -o %:r.html %:r.mtxt | open -a
>> /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
>> %:r.html
>>
>> However, when the browser launches, Vim loses focus. I'd like Vim to
>> keep focus. Is there a way I can do that?
>
> The window with the focus is managed by the operating system/window manager. I
> would try looking for this issue with a search related to Mac OS X window
> management. I doubt Vim can do anything about it, except run another command
> that sets the focus back to Vim.

While I don't know which version of Mac you have, I know that
versions more recent than what I have here offer something like
virtual desktops called "Spaces". At least on Linux with Fluxbox
managing my windows, I can (and do) tell it that certain
application windows should open on a predesignated desktop. I
don't know if Spaces has something similar, or if you set it up
that it won't haul your focus to that workspace, but it would be
where I'd start.

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: