mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-21 13:04:54 +02:00
[add] new option / always show tab count feature
This commit is contained in:
parent
c05fff8504
commit
185bcc5e88
@ -251,7 +251,10 @@ function! airline#extensions#tabline#add_label(dict, type, right)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#add_tab_label(dict)
|
function! airline#extensions#tabline#add_tab_label(dict)
|
||||||
if get(g:, 'airline#extensions#tabline#show_tab_count', 1) && tabpagenr('$') > 1
|
let show_tab_count = get(g:, 'airline#extensions#tabline#show_tab_conut', 1)
|
||||||
|
if show_tab_count == 2
|
||||||
|
call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$')))
|
||||||
|
elseif show_tab_count == 1 && tabpagenr('$') > 1
|
||||||
call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$')))
|
call a:dict.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$')))
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -956,6 +956,11 @@ with the middle mouse button to delete that buffer.
|
|||||||
|
|
||||||
* enable/disable displaying number of tabs in the right side (c) >
|
* enable/disable displaying number of tabs in the right side (c) >
|
||||||
let g:airline#extensions#tabline#show_tab_count = 1
|
let g:airline#extensions#tabline#show_tab_count = 1
|
||||||
|
|
||||||
|
Note: Not displayed if the number of tabs is less than 1
|
||||||
|
|
||||||
|
* always displaying number of tabs in the right side (c) >
|
||||||
|
let g:airline#extensions#tabline#show_tab_count = 2
|
||||||
<
|
<
|
||||||
* configure filename match rules to exclude from the tabline. >
|
* configure filename match rules to exclude from the tabline. >
|
||||||
let g:airline#extensions#tabline#excludes = []
|
let g:airline#extensions#tabline#excludes = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user