From 1247e258d08b30d608adb3522e6252b8aaa57b74 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 22 Aug 2013 11:52:47 +0430 Subject: [PATCH] enforce using jedi 0.7 --- plugin/jedi_vim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/jedi_vim.py b/plugin/jedi_vim.py index aa74064..beafec4 100644 --- a/plugin/jedi_vim.py +++ b/plugin/jedi_vim.py @@ -18,7 +18,7 @@ def echo_highlight(msg): vim.command('echohl WarningMsg | echom "%s" | echohl None' % msg) -if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 6, 0): +if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 7, 0): echo_highlight('Please update your Jedi version, it is to old.') @@ -311,6 +311,7 @@ def rename(): vim.current.window.cursor = cursor echo_highlight('Jedi did %s renames!' % len(temp_rename)) + def py_import(): # args are the same as for the :edit command args = shsplit(vim.eval('a:args')) @@ -324,6 +325,7 @@ def py_import(): cmd_args = ' '.join([a.replace(' ', '\\ ') for a in args]) new_buffer(path, cmd_args) + def py_import_completions(): argl = vim.eval('a:argl') try: @@ -337,6 +339,7 @@ def py_import_completions(): comps = ['%s%s' % (argl, c.complete) for c in script.completions()] vim.command("return '%s'" % '\n'.join(comps)) + def new_buffer(path, options=''): path = repr(PythonToVimStr(path)) vim.eval("jedi#new_buffer(%s, '%s')" % (path, options))