mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-25 09:41:33 +08:00
Add configurable variable airline#extensions#tabline#skipped_tabs_marker
This commit is contained in:
parent
7480245ebf
commit
980e78b4bf
|
@ -91,7 +91,10 @@ function! airline#extensions#tabline#tabs#get()
|
|||
let right_tab = curtab + 1
|
||||
let left_position = tabs_position
|
||||
let right_position = tabs_position + 1
|
||||
let remaining_space = &columns - strlen(s:evaluate_tabline(b.build())) - 8
|
||||
let remaining_space = &columns - strlen(s:evaluate_tabline(b.build()))
|
||||
|
||||
let skipped_tabs_marker = get(g:, 'airline#extensions#tabline#skipped_tabs_marker', '...')
|
||||
let remaining_space -= 4 + 2 * strlen(s:evaluate_tabline(skipped_tabs_marker))
|
||||
|
||||
" Add the current tab
|
||||
let tab_title = s:get_title(tab_nr_type, curtab)
|
||||
|
@ -147,12 +150,12 @@ function! airline#extensions#tabline#tabs#get()
|
|||
if get(g:, 'airline#extensions#tabline#current_first', 0)
|
||||
let left_position -= 1
|
||||
endif
|
||||
call b.insert_raw('%#airline_tab#...', left_position)
|
||||
call b.insert_raw('%#airline_tab#'.skipped_tabs_marker, left_position)
|
||||
let right_position += 1
|
||||
endif
|
||||
|
||||
if right_tab <= num_tabs
|
||||
call b.insert_raw('%#airline_tab#...', right_position)
|
||||
call b.insert_raw('%#airline_tab#'.skipped_tabs_marker, right_position)
|
||||
endif
|
||||
|
||||
let s:current_bufnr = curbuf
|
||||
|
|
|
@ -709,6 +709,9 @@ with the middle mouse button to delete that buffer.
|
|||
* rename label for tabs (default: 'tabs') (c) >
|
||||
let g:airline#extensions#tabline#tabs_label = 't'
|
||||
|
||||
* change the symbol for skipped tabs/buffers (default '...') >
|
||||
let g:airline#extensions#tabline#skipped_tabs_marker = '…'
|
||||
|
||||
* always show current tabpage/buffer first >
|
||||
let airline#extensions#tabline#current_first = 1
|
||||
< default: 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user