mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-17 07:14:10 +08:00
Customizes tabline appearance: type, close button
This commit adds a couple of new settings so that it's possible to hide the tab type (all the way to the right) and the symbol which represents the close button. The settings and their defaults: let g:airline#extensions#tabline#show_tab_type = 1 let g:airline#extensions#tabline#close_symbol = 'X'
This commit is contained in:
committed by
Emily Strickland
parent
799e5e028f
commit
f196ea1f36
@@ -6,6 +6,8 @@ let s:excludes = get(g:, 'airline#extensions#tabline#excludes', [])
|
||||
let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0)
|
||||
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
|
||||
let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1)
|
||||
let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1)
|
||||
let s:close_symbol = get(g:, 'airline#extensions#tabline#close_symbol', 'X')
|
||||
|
||||
let s:builder_context = {
|
||||
\ 'active' : 1,
|
||||
@@ -264,8 +266,10 @@ function! s:get_tabs()
|
||||
call b.add_raw('%T')
|
||||
call b.add_section('airline_tabfill', '')
|
||||
call b.split()
|
||||
call b.add_section('airline_tab', ' %999XX ')
|
||||
call b.add_section('airline_tabtype', ' tabs ')
|
||||
call b.add_section('airline_tab', ' %999X'.s:close_symbol.' ')
|
||||
if s:show_tab_type
|
||||
call b.add_section('airline_tabtype', ' tabs ')
|
||||
endif
|
||||
|
||||
let s:current_bufnr = curbuf
|
||||
let s:current_tabnr = curtab
|
||||
|
||||
Reference in New Issue
Block a user