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:
open -a MacVim.app filename1 filename2
etc.
Oh yes, so it does.
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.
Presumably the mvim URL handler opens in the existing (rather than a
new) MacVim window because it wraps the `open -a` mechanism?
If you have several windows open and want to specify which one to open
a file in you need to use the --remote and --servername arguments to
the "mvim" script (see ":h mvim"), e.g.
mvim --servername VIM --remote filename
(The server name can be gleaned from the window title.)
That's useful to know, thank you.
Cheers,
Andy
-------
http://airbladesoftware.com
--
You received this message from the "vim_mac" 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
To unsubscribe from this group, send email to vim_mac+unsubscribegooglegroups.com or
reply to this email with the words "REMOVE ME" as the subject.