feat(): allow for buffer index formatting

This commit is contained in:
mhartington 2016-11-25 12:36:55 -05:00
parent 3ebd7ad64b
commit ee8173e41d
No known key found for this signature in database
GPG Key ID: 493BFB24814E6209
2 changed files with 20 additions and 4 deletions

View File

@ -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()

View File

@ -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'