From: Mark Volkmann, May 18, 2006 3:24 PM
> On 5/18/06, Scot P. Floess <[EMAIL PROTECTED]> wrote:
> >
> > ....list the full path in my tabs.
>
> I've also failed to find that, but I want the opposite.

  function! TabpageName(mode)
      if     a:mode == 1
          return fnamemodify(expand("%"), ":p:h")
      elseif a:mode == 2
          let name = fnamemodify(expand("%"), ":p:t")
          if name == ""
              return "(Untitled)"
          endif
          return name
      endif
  endfunction
  function! TabpageState()
      if &modified != 0
          return '*'
      else
          return ''
      endif
  endfunction

  set guitablabel=%{TabpageName(2)}%{TabpageState()}

Change the argument in the TabpageName() call to 1 for full paths.

-- 
Steve Hall  [ digitect mindspring com ]
:: Cream... something good to put in your Vim!
::   http://cream.sourceforge.net


Reply via email to