From 02244d17347cfef6dee3f6eb96ba9ac8b4bcbeea Mon Sep 17 00:00:00 2001 From: gryf Date: Tue, 13 Dec 2016 14:25:22 +0100 Subject: [PATCH] Added check for command existsing instead of setting buffer variable --- ftplugin/python/pep8_fn.vim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ftplugin/python/pep8_fn.vim b/ftplugin/python/pep8_fn.vim index 77cf225..9c75ddb 100644 --- a/ftplugin/python/pep8_fn.vim +++ b/ftplugin/python/pep8_fn.vim @@ -48,10 +48,8 @@ let s:plugin_path = expand(':p:h', 1) -if exists("b:did_pep8_plugin") +if exists(":Pep8") finish " only load once -else - let b:did_pep8_plugin = 1 endif if !exists("g:pep8_exclude") @@ -82,7 +80,6 @@ function! s:LoadPep8() endif endfunction - call s:LoadPep8() function s:Pep8()