mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 15:23:55 +08:00
Add option for numbered tabs
Cleaned up variable name, added documentation
This commit is contained in:
parent
0609a1f945
commit
62f3d1d412
|
@ -71,7 +71,11 @@ function! airline#extensions#tabline#ctrlspace#add_tab_section(builder, pull_rig
|
|||
\ .s:highlight_groups[(4 * tab.modified) + (3 * tab.current)]
|
||||
\ .pos_extension
|
||||
|
||||
call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T')
|
||||
if get(g:, 'airline#extensions#tabline#ctrlspace_show_tab_nr', 0) == 0
|
||||
call a:builder.add_section_spaced(group, '%'.tab.index.'T'.tab.title.ctrlspace#api#TabBuffersNumber(tab.index).'%T')
|
||||
else
|
||||
call a:builder.add_section_spaced(group, '%'.(tab.index).'T'.(tab.index).(g:airline_symbols.space).(tab.title).ctrlspace#api#TabBuffersNumber(tab.index).'%T')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -752,6 +752,9 @@ with the middle mouse button to delete that buffer.
|
|||
* enable/disable displaying tab number in tabs mode. >
|
||||
let g:airline#extensions#tabline#show_tab_nr = 1
|
||||
|
||||
* enable/disable displaying tab number in tabs mode for ctrlspace. (c) >
|
||||
let g:airline#extensions#tabline#ctrlspace_show_tab_nr = 0
|
||||
|
||||
* enable/disable displaying tab type (e.g. [buffers]/[tabs]) >
|
||||
let g:airline#extensions#tabline#show_tab_type = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user