From 527e6661e65713fb7269f3d7a1072fa268f4d756 Mon Sep 17 00:00:00 2001 From: PsychoMario Date: Fri, 26 Dec 2014 21:48:06 +0000 Subject: [PATCH] added tabline#show_tabs to disable tab bar --- autoload/airline/extensions/tabline.vim | 3 ++- doc/airline.txt | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tabline.vim b/autoload/airline/extensions/tabline.vim index 91da5a78..5a65cc06 100644 --- a/autoload/airline/extensions/tabline.vim +++ b/autoload/airline/extensions/tabline.vim @@ -5,6 +5,7 @@ let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') 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_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 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:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1) @@ -113,7 +114,7 @@ function! airline#extensions#tabline#get() let s:current_tabcnt = curtabcnt let s:current_bufnr = -1 " force a refresh... endif - if s:show_buffers && curtabcnt == 1 + if s:show_buffers && curtabcnt == 1 || !s:show_tabs return s:get_buffers() else return s:get_tabs() diff --git a/doc/airline.txt b/doc/airline.txt index ddc81ce0..7620abe5 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -391,6 +391,9 @@ eclim * enable/disable displaying buffers with a single tab. > let g:airline#extensions#tabline#show_buffers = 1 < +* enable/disable displaying tabs, regardless of number. > + let g:airline#extensions#tabline#show_tabs = 1 +< * configure filename match rules to exclude from the tabline. > let g:airline#extensions#tabline#excludes = [] <