From 8aad42644c949e062d012c18ec2ce5934f4eced1 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Fri, 27 Feb 2015 21:12:45 -0500 Subject: [PATCH] integration with taboo.vim; resolves #476 and #575. --- README.md | 2 +- autoload/airline/extensions/tabline.vim | 21 ++++++++++++++++++--- doc/airline.txt | 12 +++++++++--- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ea649fc3..6527383a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Lean & mean status/tabline for vim that's light as air. # Features * Tiny core written with extensibility in mind ([open/closed principle][8]). -* Integrates with a variety of plugins, including: [vim-bufferline][6], [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], [vim-signify][30], [syntastic][5], [eclim][34], [lawrencium][21], [virtualenv][31], [tmuxline][35]. +* Integrates with a variety of plugins, including: [vim-bufferline][6], [fugitive][4], [unite][9], [ctrlp][10], [minibufexpl][15], [gundo][16], [undotree][17], [nerdtree][18], [tagbar][19], [vim-gitgutter][29], [vim-signify][30], [syntastic][5], [eclim][34], [lawrencium][21], [virtualenv][31], [tmuxline][35], and more. * Looks good with regular fonts and provides configuration points so you can use unicode or powerline symbols. * Optimized for speed; it loads in under a millisecond. * Extensive suite of themes for popular color schemes including [solarized][23] (dark and light), [tomorrow][24] (all variants), [base16][32] (all variants), [molokai][25], [jellybeans][26] and others; have a look at the [screenshots][14] in the wiki. diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 1b186d2f..41350cc6 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -5,6 +5,12 @@ let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) +let s:taboo = get(g:, 'airline#extensions#taboo#enabled', 1) && get(g:, 'loaded_taboo', 0) +if s:taboo + let g:taboo_tabline = 0 +endif + + function! airline#extensions#tabline#init(ext) if has('gui_running') set guioptions-=e @@ -72,9 +78,18 @@ function! airline#extensions#tabline#get() endfunction function! airline#extensions#tabline#title(n) - let buflist = tabpagebuflist(a:n) - let winnr = tabpagewinnr(a:n) - return airline#extensions#tabline#get_buffer_name(buflist[winnr - 1]) + let title = '' + if s:taboo + let title = TabooTabTitle(a:n) + endif + + if empty(title) + let buflist = tabpagebuflist(a:n) + let winnr = tabpagewinnr(a:n) + return airline#extensions#tabline#get_buffer_name(buflist[winnr - 1]) + endif + + return title endfunction function! airline#extensions#tabline#get_buffer_name(nr) diff --git a/doc/airline.txt b/doc/airline.txt index 7449c39c..9cc29675 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -538,19 +538,19 @@ promptline let airline#extensions#promptline#color_template = 'visual' let airline#extensions#promptline#color_template = 'replace' < -------------------------------------- *airline-nrrwrgn* +------------------------------------- *airline-nrrwrgn* NrrwRgn * enable/disable NrrwRgn integration > let g:airline#extensions#nrrwrgn#enabled = 1 -------------------------------------- *airline-capslock* +------------------------------------- *airline-capslock* vim-capslock * enable/disable vim-capslock integration > let g:airline#extensions#capslock#enabled = 1 -------------------------------------- *airline-windowswap* +------------------------------------- *airline-windowswap* vim-windowswap * enable/disable vim-windowswap integration > @@ -559,6 +559,12 @@ vim-windowswap * set marked window indicator string > let g:airline#extensions#windowswap#indicator_text = 'WS' < +------------------------------------- *airline-taboo* +taboo.vim + +* enable/disable taboo.vim integration > + let g:airline#extensions#taboo#enabled = 1 +< ============================================================================== ADVANCED CUSTOMIZATION *airline-advanced-customization*