| author | Diego Ongaro <ongardie@gmail.com> | 2009-05-29 04:48:16 (GMT) |
|---|---|---|
| committer | Diego Ongaro <ongardie@gmail.com> | 2009-05-29 04:48:16 (GMT) |
| commit | ae39cc8678860376a07cd3e797f78135cb134fa3 (patch) | |
| tree | b73f46255378637b5e5610b67b3d0f7ed253676b | |
| parent | 8db9bc296aa6d8158c8bc54a99287c161ac85fc0 (diff) | |
| download | vim-ae39cc8678860376a07cd3e797f78135cb134fa3.zip vim-ae39cc8678860376a07cd3e797f78135cb134fa3.tar.gz vim-ae39cc8678860376a07cd3e797f78135cb134fa3.tar.bz2 | |
Adds tab options
| -rw-r--r-- | vimrc | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -61,4 +61,34 @@ endif let g:openssl_backup = 1 +function! GuiTabLabel() + " buffer_number[+] buffer_name [(number_windows)] + + " Add buffer number + let label = v:lnum + + " Add '+' if one of the buffers in the tab page is modified + let bufnrlist = tabpagebuflist(v:lnum) + for bufnr in bufnrlist + if getbufvar(bufnr, "&modified") + let label .= '+' + break + endif + endfor + + " Append the buffer name + let label .= ' ' . bufname(bufnrlist[tabpagewinnr(v:lnum) - 1]) + + " Append the number of windows in the tab page if more than one + let wincount = tabpagewinnr(v:lnum, '$') + if wincount > 1 + let label .= ' (' . wincount . ')' + endif + + return label +endfunction + +set guitablabel=%{GuiTabLabel()} +set tabpagemax=1000 + " vim: set ts=2 sw=2 ai si et : |
