mvim and multiple windows

22 views
Skip to first unread message

Smitti

unread,
Aug 20, 2007, 2:31:54 PM8/20/07
to vim_mac
First of all, great job! This is the missing editor for OS X.

Using mvim script, every call opens a new MacVim window.
Is it possible to change the behavior to open files
in a new buffer (and tab) instead of a new window?

Thanks,
Adam

Nico Weber

unread,
Aug 20, 2007, 2:58:32 PM8/20/07
to vim...@googlegroups.com
Hi,

> Using mvim script, every call opens a new MacVim window.
> Is it possible to change the behavior to open files
> in a new buffer (and tab) instead of a new window?

You can use `mvim -p *.c` to open all c files in the current folder
in tab Pages. If you want to open a file in an existing window, you
usually use the --remote-tab-silent parameter, which is only enabled
if +clientserver support is compiled in. But iirc this is not (yet?)
supported in OS X :-P

Nico

björn

unread,
Aug 21, 2007, 5:26:55 AM8/21/07
to vim...@googlegroups.com

Using mvim script, every call opens a new MacVim window.
Is it possible to change the behavior to open files
in a new buffer (and tab) instead of a new window?

At this point in time it would require quite a bit of work to implement this behaviour.  I can only suggest that if you want to open files in a particular window, then isssue the opening commands from that window.  For instance:

  :tabf filename
  :tab drop *.c

It is also possible to drag and drop files onto a window to open in tabs.


/Björn

Nico Weber

unread,
Aug 21, 2007, 8:36:40 AM8/21/07
to vim...@googlegroups.com
> Using mvim script, every call opens a new MacVim window.
> Is it possible to change the behavior to open files
> in a new buffer (and tab) instead of a new window?
>
> At this point in time it would require quite a bit of work to
> implement this behaviour.

It's not too bad...the actual FEAT_CLIENTSERVER code in os_mswin.c is
about 600 lines, and there are only 54 places in the source that
check for FEAT_CLIENTSERVER.

Just saying ;-)

Nico

björn

unread,
Sep 3, 2007, 9:31:24 AM9/3/07
to vim_mac

For the record: you can (as of MacVim r229) use --remote and friends
to accomplish this, e.g.:

mvim --remote-tab *.c

In Vim, take a look at the help on 'client-server', i.e.

:h client-server


/Björn

Reply all
Reply to author
Forward
0 new messages