Groleo Marius wrote:
On 8/23/06, David Fishburn <[EMAIL PROTECTED]> wrote:
:tab new c:\temp\whatever.txt

:) that is mentioned in :help, and i dont see how it solves the :e or
ctrl-] problem
Also , :tab sball is not a solution.

I wonder if a tabpage has a maximum number
of windows it can hold.
If that could be set to 1, and switchbuf=tab, then it should open a
buffer in a new
tab
HTH,
Dave




Well, that depends on a number of options. If all your windows are horizontally split, the number of windows is limited by the following equations:

        &lines >= &cmdheight + (Nw - 1) * (&wmh + 1) + max(&wmh + 1, 2)
        &cmdheight >= 1
        &wmh = &winminheight >= 0

i.e.,
- the command-line occupies 'cmdheight' lines (minimum 1)
- each window occupies at least 'winminheight' lines, plus one for the status line - in addition, the current window cannot be less than 1 line high (plus one for the status line).

The above is slightly inexact: if ((Nw=1 && &laststatus=1) || &laststatus=0), then the bottom window doesn't have a status line.

How large your 'lines' option can get depends (in console Vim) on your terminal or terminal emulator, or (in gvim) on your screen resolution and on the 'guifont' (face and size) you are using.

So if you set 'winminheight' to (&lines - &cmdheight - !!&laststatus), you can only have one window per tab (not counting vertically split windows); but I guess that if you try to split it (using :split and not :tab split) you won't get an additional tab but an error.

"tab" is not a valid setting for 'switchbuf' according to my options.txt (for Vim 7.0, dated 2006 Jun 28); "usetab" means "open the new buffer in a different tab if it is already loaded there".


Best regards,
Tony.

Reply via email to