Yakov Lerner wrote:
On 7/10/06, SHANKAR R-R66203 <[EMAIL PROTECTED]> wrote:
Hi
  When I execute the command,
    :set guitablabel=xyz
  All the tabpages get the same name.
  How do I set a separate string as a name for each tab label.

You need to use cunningly the % in the value for that.
To set the string manually, you'll probably want %{...} (funciton call)
For the beginning example, try
        :set guitablabel=%n\ %t
as an example, or other %-procedural formats as described in :help statusline
(scroll down till /item  meaning)

Yakov



There is an example at "help setting-guitablabel". Here's another example from my vimrc, using a different approach (setting the whole tab line using "vim" tabs, not graphical tabs). YMMV.

if exists("+showtabline")
  function MyTabLine()
    let s = ''
    let t = tabpagenr()
    let i = 1
    while i <= tabpagenr('$')
      let buflist = tabpagebuflist(i)
      let winnr = tabpagewinnr(i)
      let s .= '%' . i . 'T'
      let s .= (i == t ? '%1*' : '%2*')
      let s .= ' '
      let s .= i . ':'
      let s .= winnr . '/' . tabpagewinnr(i,'$')
      let s .= ' %*'
      let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
      let file = bufname(buflist[winnr - 1])
      let file = fnamemodify(file, ':p:t')
      if file == ''
        let file = '[No Name]'
      endif
      let s .= file
      let i = i + 1
    endwhile
    let s .= '%T%#TabLineFill#%='
    let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X')
    return s
  endfunction
  set stal=2
  set tabline=%!MyTabLine()
  map  <F10>    :tabnext<CR>
  map! <F10>    <C-O>:tabnext<CR>
  map  <S-F10>  :tabprev<CR>
  map! <S-F10>  <C-O>:tabprev<CR>
endif



Best regards,
Tony.

Reply via email to