mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-22 15:59:23 +08:00
feat(): allow for buffer index formatting
This commit is contained in:
parent
3ebd7ad64b
commit
ee8173e41d
|
@ -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()
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user