mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 09:58:29 +08: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
|
||||
|
||||
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('$')))
|
||||
endif
|
||||
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) >
|
||||
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. >
|
||||
let g:airline#extensions#tabline#excludes = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user