* Christian Brabandt <cbli...@256bit.org> [100122 00:47]: > On Fri, January 22, 2010 3:12 am, John Magolske wrote: > > count. Searching around some more, I found this solution [1]: > > > > set rulerformat=%22(%{g:zbuflistcount};%M%n\ %=%l,%c%V\ %P%) > > autocmd BufAdd * let g:zbuflistcount += 1 > > autocmd BufDelete * let g:zbuflistcount -= 1 > > autocmd VimEnter * call UpdateZBufLC() > > function UpdateZBufLC() > > let lst = range(1, bufnr('$')) > > call filter(lst, 'buflisted(v:val)') > > let g:zbuflistcount = len(lst) > > endfunction > > > > hm, that should be equivalent to > :set stl={len(filter(range(1,bufnr('$')),'buflisted(v:val)'))} > > so no need for autocommands.
Thanks, nice & concise. Not sure why the autocommands incrementing & decrementing g:zbuflistcount on BufAdd & BufDelete... Your suggestion works great, just added a % character :set stl=%{len(filter(range(1,bufnr('$')),'buflisted(v:val)'))} Regards, John -- John Magolske http://B79.net/contact -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php