diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index 8c3f3445..d2771751 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -13,8 +13,7 @@ let s:current_modified = 0 let s:current_tabline = '' let s:current_visible_buffers = [] -let s:number_map = &encoding == 'utf-8' - \ ? { +let s:number_map = { \ '0': '⁰', \ '1': '¹', \ '2': '²', @@ -26,6 +25,8 @@ let s:number_map = &encoding == 'utf-8' \ '8': '⁸', \ '9': '⁹' \ } +let s:number_map = &encoding == 'utf-8' + \ ? get(g:, 'airline#extensions#tabline#buffer_idx_format', s:number_map) \ : {} function! airline#extensions#tabline#buffers#off() diff --git a/doc/airline.txt b/doc/airline.txt index d9109a58..5e4363fd 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -566,8 +566,8 @@ with the middle mouse button to delete that buffer. * enable/disable displaying tab type (far right) > let g:airline#extensions#tabline#show_tab_type = 1 - - Note: The tab-type will only be displayed in tab-mode, + + Note: The tab-type will only be displayed in tab-mode, if there are no splits shown. (See: g:airline#extensions#tabline#show_splits) * rename label for buffers (default: 'buffers') (c) @@ -602,6 +602,21 @@ with the middle mouse button to delete that buffer. Use |gt| for switching tabs. In tabmode, those mappings will switch to the specified tab. +* change the display format of the buffer index > + let g:airline#extensions#tabline#buffer_idx_format = { + \ '0': '0 ', + \ '1': '1 ', + \ '2': '2 ', + \ '3': '3 ', + \ '4': '4 ', + \ '5': '5 ', + \ '6': '6 ', + \ '7': '7 ', + \ '8': '8 ', + \ '9': '9 ' + \} +< + * defines the name of a formatter for how buffer names are displayed. (c) let g:airline#extensions#tabline#formatter = 'default'