From e967d09bf3c4619f3a8deeb0867f7b639b7397f9 Mon Sep 17 00:00:00 2001 From: Vitor Antunes Date: Thu, 5 Sep 2013 15:42:17 +0100 Subject: [PATCH] Allow flag configuration of tagbar statusline string --- autoload/airline/extensions/tagbar.vim | 4 +++- doc/airline.txt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tagbar.vim b/autoload/airline/extensions/tagbar.vim index 214d443e..5eb08687 100644 --- a/autoload/airline/extensions/tagbar.vim +++ b/autoload/airline/extensions/tagbar.vim @@ -1,6 +1,8 @@ " MIT License. Copyright (c) 2013 Bailey Ling. " vim: et ts=2 sts=2 sw=2 +let s:flags = get(g:, 'airline#extensions#tagbar#flags', '') + " Arguments: current, sort, fname function! airline#extensions#tagbar#get_status(...) let builder = airline#builder#new({ 'active': a:1 }) @@ -18,7 +20,7 @@ endfunction function! airline#extensions#tagbar#currenttag() if get(w:, 'airline_active', 0) - return tagbar#currenttag('%s', '') + return tagbar#currenttag('%s', '', s:flags) endif return '' endfunction diff --git a/doc/airline.txt b/doc/airline.txt index 5101e465..0db94705 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -236,6 +236,9 @@ tagbar * enable/disable tagbar integration > let g:airline#extensions#tagbar#enabled = 1 < +* change how tags are displayed (:help tagbar-statusline) > + let g:airline#extensions#tagbar#flags = 'f' +< ------------------------------------- *airline-csv* csv.vim