Robert Webb wrote:

> > > - I'd like to be able to put whatever name I want on the tabs.
> > > There doesn't seem to be a way to do this.  'guitablabel' is an
> > > option *shared* by all tabs, so I can't set one tab to "Work" and
> > > another to "Play" for example, and can only set them to different
> > > names if the names are based on their files etc.  All I want to do
> > > is set the name of each tab to a fixed string.
> > 
> > Set a tab page local variable and use that in 'guitablabel'.
> 
> I tried this:
> 
>     :let t:tabName = "Blah"
>     :set guitablabel=%{t:tabName}
> 
> Now t:tabName has to be defined in all tabs.  I set it to "" in the
> other tabs, but then I just get a blank tab name.  Would be nice to be
> able to set the name for some tabs, but leave others as default.
> Ideally, if the expression for 'guitablabel' can't be evaluated for
> one tab, or if it comes out as an empty string, then that tab should
> use the default name.

You wouldn't type these things, they would be in a script.  There it's
not difficult to check for the existence of t:tabName.

     :set guitablabel=%{MyTabName()}
     func MyTabName()
        if exists('t:tabName')
                return t:tabName
        endif
        return ''
     endfunc

-- 
hundred-and-one symptoms of being an internet addict:
14. You start introducing yourself as "Jim at I-I-Net dot net dot au"

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to