add expand to make paths which contains spaces work correctly

This commit is contained in:
Sheng Yun
2014-01-02 14:26:48 +08:00
parent 90f0bff2de
commit 99a9445acb

View File

@@ -11,13 +11,13 @@ import os
# vim.command('echom expand("<sfile>:p:h:h")') # broken, <sfile> inside function # vim.command('echom expand("<sfile>:p:h:h")') # broken, <sfile> inside function
# sys.path.insert(0, os.path.join(vim.eval('expand("<sfile>:p:h:h")'), 'jedi')) # sys.path.insert(0, os.path.join(vim.eval('expand("<sfile>:p:h:h")'), 'jedi'))
sys.path.insert(0, os.path.join(vim.eval('s:script_path'), 'jedi')) sys.path.insert(0, os.path.join(vim.eval('expand(s:script_path)'), 'jedi'))
# to display errors correctly # to display errors correctly
import traceback import traceback
# update the sys path to include the jedi_vim script # update the sys path to include the jedi_vim script
sys.path.insert(0, vim.eval('s:script_path')) sys.path.insert(0, vim.eval('expand(s:script_path)'))
try: try:
import jedi_vim import jedi_vim
except ImportError: except ImportError: