Merge pull request #1337 from mhartington/master

feat(): allow for buffer index formatting
This commit is contained in:
Christian Brabandt 2016-11-26 14:26:47 +01:00 committed by GitHub
commit ccdc3d6c60
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

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