Oh come on...really? Is it just too easy and stupid to even warrant a response?
On Jan 29, 12:38 am, soundphed <[email protected]> wrote: > Hi, would it be easy to display vim's current working directory right- > aligned in the tabline ? It seems like this would be possible and > rather simple, I just don't know the exact vim variables and string > manipulations to get what I want where I want it. Has this already > been done? Does anyone else think this would be useful? It seems very > useful to me...Here is my current tabline function: > > fu! MyTabLine() > let s = '' > for i in range(tabpagenr('$')) > " select the highlighting > if i + 1 == tabpagenr() > let s .= '%#TabLineSel#' > else > let s .= '%#TabLine#' > endif > > " set the tab page number (for mouse clicks) > let s .= '%' . (i + 1) . 'T' > > " the label is made by MyTabLabel() > let s .= ' %{MyTabLabel(' . (i + 1) . ')} ' > endfor > > " after the last tab fill with TabLineFill and reset tab page nr > let s .= '%#TabLineFill#%T' > " > " right-align the label to close the current tab page > " if tabpagenr('$') > 1 > let s .= '%=%#TabHead#'.v:fname_in > " endif > > return s > endfu > > fu! MyTabLabel(n) > let buflist = tabpagebuflist(a:n) > let winnr = tabpagewinnr(a:n) > return '['.a:n.']'.bufname(buflist[winnr - 1]) > endfu --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
