add option to display both tab number and splits. resolves #440.

This commit is contained in:
Bailey Ling 2015-03-01 09:56:36 -05:00
parent 3635b78448
commit 96a94d8c3a
2 changed files with 6 additions and 3 deletions

View File

@ -55,9 +55,11 @@ function! airline#extensions#tabline#tabs#get()
let val = '%('
if s:show_tab_nr
if s:tab_nr_type == 0
let val .= ' %{len(tabpagebuflist('.i.'))}'
else
let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}'
elseif s:tab_nr_type == 1
let val .= (g:airline_symbols.space).i
else "== 2
let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}'
endif
endif
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')

View File

@ -437,9 +437,10 @@ eclim <https://eclim.org>
* configure filename match rules to exclude from the tabline. >
let g:airline#extensions#tabline#excludes = []
<
* configure how numbers are calculated in tab mode. >
* configure how numbers are displayed in tab mode. >
let g:airline#extensions#tabline#tab_nr_type = 0 " # of splits (default)
let g:airline#extensions#tabline#tab_nr_type = 1 " tab number
let g:airline#extensions#tabline#tab_nr_type = 2 " splits and tab number
<
* enable/disable displaying tab number in tabs mode. >
let g:airline#extensions#tabline#show_tab_nr = 1