From df2460066686367b7949fe024c43ffd9d672f469 Mon Sep 17 00:00:00 2001 From: Wang Nan Date: Sat, 9 Dec 2017 22:03:42 +0800 Subject: [PATCH] Don't report too many errors when vim doesn't support python --- autoload/coquille.vim | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/autoload/coquille.vim b/autoload/coquille.vim index ff71b20..0e5045f 100644 --- a/autoload/coquille.vim +++ b/autoload/coquille.vim @@ -5,10 +5,22 @@ if !exists('coquille_auto_move') let g:coquille_auto_move="false" endif +try + py import sys, vim +catch /E319:/ + if !exists('s:warned') + echo "vim doesn't support python. Turn off coquille" + let s:warned = 1 + endif + function! coquille#Register() + endfunction + finish +endtry + + " Load vimbufsync if not already done call vimbufsync#init() -py import sys, vim py if not vim.eval("s:current_dir") in sys.path: \ sys.path.append(vim.eval("s:current_dir")) py import coquille