Skip to content

Instantly share code, notes, and snippets.

@saihoooooooo
Created December 19, 2011 11:01
Show Gist options
  • Save saihoooooooo/1496652 to your computer and use it in GitHub Desktop.
Save saihoooooooo/1496652 to your computer and use it in GitHub Desktop.
my guitabline
autocmd MyAutoCmd GUIEnter * set guitablabel=%t%{GetTabModified()}\ [b:%{GetBufferTabLength()}]
function! GetTabModified()
for bufnr in tabpagebuflist(v:lnum)
if getbufvar(bufnr, "&modified")
return ' [+]'
endif
endfor
return ''
endfunction
function! GetBufferTabLength()
return len(filter(keys(t:unite_buffer_dictionary), 'buflisted(v:val + 0)'))
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment