If by "making the desired tab current" you mean using :tabn {count} then
it isn't allowed. I imagine changing tabs within the tabline function
would be A Bad Thing, and would cause recursion.

I hadn't thought about using a global array of names, although it would
be a pain to maintain when one closes a tab (and I have better things to
program than that right now! :)

Anyone else know if you can get a tab local variable somehow?

Max


> -----Original Message-----
> From: A.J.Mechelynck [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 03, 2006 10:32 AM
> To: Max Dyckhoff
> Cc: vim@vim.org
> Subject: Re: Checking if a variable exists in a given tab
> 
> Max Dyckhoff wrote:
> > I'm sure this is an easy one, I just can't find the answer anywhere.
> >
> > I'm writing my own tabline function (based heavily on the one by
Tony
> > Mechelynck, thanks!) and I want to be able to name a tab manually.
The
> > best way I can think to do this is to have a tab local variable,
such as
> > t:maxd_TabName. Only problem is that within the script I can only
check
> > if that variable exists within the CURRENT tab.
> >
> > So how can I get a tab local variable from a numbered tab? I've
found
> > gettabwinvar(), but I just can't make it work ("echo gettabwinvar(i,
0,
> > "maxd_TabName")" doesn't work).
> >
> > Thanks in advance!
> >
> > --
> > Max Dyckhoff
> > AI Engineer
> > Bungie Studios
> >
> >
> >
> >
> 
> What about making the desired tab (temporarily) current while checking
> if the variable exists? Maybe "manually naming" the current tab is
good
> enough (the user can change tabs manually too)? Or else, rather than a
> separate variable in each tab, use a global array (a List, if you
will),
> with as many items as there are tabs?
> 
> 
> Best regards,
> Tony.

Reply via email to