From d68fcfa6dc70d2f3a5befd8cb32d79a75b4867aa Mon Sep 17 00:00:00 2001 From: gryf Date: Sun, 11 Dec 2016 09:28:26 +0100 Subject: [PATCH] Set function on statusbar only if tagbar is avaialable --- vimrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index 2e3c14f..65d58f6 100644 --- a/vimrc +++ b/vimrc @@ -94,8 +94,10 @@ set statusline=%<%F " filename (fullpath) set statusline+=\ %h " indicator for help buffer set statusline+=%m " modified flag set statusline+=%r " readonly flag -set statusline+=\ %{tagbar#currenttag('%s','','f')} " current tag -set statusline+=\ %{tagbar#currenttagtype('(%s)','')} " current tag type +if exists(':Tagbar') + set statusline+=\ %{tagbar#currenttag('%s','','f')} " current tag + set statusline+=\ %{tagbar#currenttagtype('(%s)','')} " current tag type +endif set statusline+=%= " switch to the right set statusline+=%(%l,%c%V%) " line, column and virtual column set statusline+=\ %3p%% " percentage of the file