mvim and multiple windows

已查看 22 次
跳至第一个未读帖子

Smitti

未读,
2007年8月20日 14:31:542007/8/20
收件人 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

未读,
2007年8月20日 14:58:322007/8/20
收件人 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

未读,
2007年8月21日 05:26:552007/8/21
收件人 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

未读,
2007年8月21日 08:36:402007/8/21
收件人 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

未读,
2007年9月3日 09:31:242007/9/3
收件人 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

回复全部
回复作者
转发
0 个新帖子