On Tue, Mar 31, 2009 at 02:28:12PM +0300, Nicolas Aggelidis wrote:

> hi to all the list! a fellow vimmer (from the list) has posted the
> following tabline for gvim [i don't recall if it was exactly the
> same]:
> 

[code snipped...]

> 
> this function ,works great for gvim, but when i try to use it with
> vim, i get the following errors:
> 
> Error detected while processing function VimTabLabel:
> line    5:
> E714: List required

On line 5 of the function, the variable v:lnum was referenced.
>From :help v:lnum:
                        *v:lnum* *lnum-variable*
v:lnum      Line number for the 'foldexpr' |fold-expr| and 'indentexpr'
        expressions, tab page number for 'guitablabel' and
        'guitabtooltip'.  Only valid while one of these expressions is
        being evaluated.  Read-only when in the |sandbox|.

The problem was that guitablabel isn't called from within console Vim,
so v:lnum doesn't have a valid value for the purposes of
tabpagebuflist().

> is there any way to convert it for vim?

Not really.  There isn't an analog to the 'guitablabel' setting in
console Vim.  The closest thing is 'tabline', which operates rather
differently.  Instead of writing a function which makes one label at a
time, in console Vim you build the tabline in one shot.

Read up on it:
:help tabline

There's a nice example in the docs that you can tweak to your liking.

-- 
Erik Falor
Registered Linux User #445632 http://counter.li.org

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to