update jedi notification

This commit is contained in:
David Halter
2013-05-14 22:20:39 +04:30
parent daa7f1c60c
commit ab5065753e

View File

@@ -13,6 +13,14 @@ import jedi.keywords
from jedi._compatibility import unicode from jedi._compatibility import unicode
def echo_highlight(msg):
vim.command('echohl WarningMsg | echom "%s" | echohl None' % msg)
if not hasattr(jedi, '__version__') or jedi.__version__ < (0, 6, 0):
echo_highlight('Please update your Jedi version, it is to old.')
class PythonToVimStr(unicode): class PythonToVimStr(unicode):
""" Vim has a different string implementation of single quotes """ """ Vim has a different string implementation of single quotes """
__slots__ = [] __slots__ = []
@@ -26,10 +34,6 @@ class PythonToVimStr(unicode):
return '"%s"' % s.replace('\\', '\\\\').replace('"', r'\"') return '"%s"' % s.replace('\\', '\\\\').replace('"', r'\"')
def echo_highlight(msg):
vim.command('echohl WarningMsg | echo "%s" | echohl None' % msg)
def get_script(source=None, column=None): def get_script(source=None, column=None):
jedi.settings.additional_dynamic_modules = [b.name for b in vim.buffers jedi.settings.additional_dynamic_modules = [b.name for b in vim.buffers
if b.name is not None and b.name.endswith('.py')] if b.name is not None and b.name.endswith('.py')]