From c33b0409cdc374424e626483480c34a3e1605b44 Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sat, 7 May 2011 18:13:00 +1200 Subject: [PATCH] Check whether filetype detection is turned on --- plugin/tagbar.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index ccc168c..93154e2 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -51,6 +51,16 @@ else endif endif +redir => s:ftype_out +silent filetype +redir END +if s:ftype_out !~# 'detection:ON' + echomsg 'Tagbar: Filetype detection is turned off, skipping plugin' + unlet s:ftype_out + finish +endif +unlet s:ftype_out + let g:loaded_tagbar = 1 if !exists('g:tagbar_left')