Re: How do I open a file from the Terminal into MacVim's current window?

2010-03-26 Thread Andrew Stewart
On 26 Mar 2010, at 16:08, björn wrote: MacVim works like this: each window runs its own Vim process. Opening a file from Finder results in the MacVim app getting a request to open a file (mvim:// handler requests also end up here). At this point MacVim will look at your preferences and respect

Re: How do I open a file from the Terminal into MacVim's current window?

2010-03-26 Thread björn
On 25 March 2010 18:47, Andrew Stewart wrote: > > So to summarise, given a MacVim instance in the background, and focus in the > Terminal: > > * `open -a MacVim.app filename1` will open filename1 in the existing MacVim > window. > * `mvim filename1` will open filename1 in a new MacVim window. > > P

Re: How do I open a file from the Terminal into MacVim's current window?

2010-03-25 Thread Andrew Stewart
On 24 Mar 2010, at 21:30, björn wrote: In the Terminal: $ open "mvim://open?url=file:///path/to/file" And this respects the MacVim preference. If there's a more direct way I'd like to hear it...but for now this will do. If you have the above preference set it is enough to simply use: op

Re: How do I open a file from the Terminal into MacVim's current window?

2010-03-24 Thread björn
On 24 March 2010 12:50, Andrew Stewart wrote: >> I have set the MacVim preference "Open files from applications" to "in >> the current window and set the arglist".  This give the behaviour I >> want when double-clicking in the Finder -- but doesn't for the >> Terminal. > > Aha: making use of the ab

Re: How do I open a file from the Terminal into MacVim's current window?

2010-03-24 Thread Andrew Stewart
> I have set the MacVim preference "Open files from applications" to "in > the current window and set the arglist".  This give the behaviour I > want when double-clicking in the Finder -- but doesn't for the > Terminal. Aha: making use of the above, I can get the result I want. In the Terminal:

How do I open a file from the Terminal into MacVim's current window?

2010-03-24 Thread Andrew Stewart
Hello, Following up on my question yesterday, how do I open a file from the Terminal into MacVim's current window? For example, let's say I have various splits open onto various buffers in MacVim; I go to the Terminal and type `mvim README`. I expect to see the file README loaded in