On 8/6/06, Kim Schulz <[EMAIL PROTECTED]> wrote:
is there an equivalent to bufexists() and bufnr() but for tabs in vim
7?

Analog of bufnr() for tabs is tabpagenr().

To check whether tabpage number N exists,
you can simply check (N<= tabpagenr()).

Note that there is no full analogy between buffers and tabs;
(1) buffer has number and name; tabpage has number but no name.
(2) buffer numbers are fixed and can have holes when buffers are wiped
out. Tabpage numbers do not have holes, they are renumbered when
non-last tabpage is closed.

If you want to start from bufname and arrive to tabpage number,
you need to use around tabpagebuflist() function,
:help tabpagebuflist()

Yakov

Reply via email to