mvim and multiple windows

22 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Smitti

chưa đọc,
14:31:54 20 thg 8, 200720/8/07
đến 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

chưa đọc,
14:58:32 20 thg 8, 200720/8/07
đến 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

chưa đọc,
05:26:55 21 thg 8, 200721/8/07
đến 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

chưa đọc,
08:36:40 21 thg 8, 200721/8/07
đến 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

chưa đọc,
09:31:24 3 thg 9, 20073/9/07
đến 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

Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới