diff --git a/autoload/UltiSnips/bootstrap.vim b/autoload/UltiSnips/bootstrap.vim index 8819073..46f2e8e 100644 --- a/autoload/UltiSnips/bootstrap.vim +++ b/autoload/UltiSnips/bootstrap.vim @@ -37,14 +37,8 @@ function! UltiSnips#bootstrap#Bootstrap() endif endif - " Expand our path - exec g:_uspy "import vim, os, sys" - exec g:_uspy "sourced_file = vim.eval('s:SourcedFile')" - exec g:_uspy "while not os.path.exists(os.path.join(sourced_file, 'pythonx')): - \ sourced_file = os.path.dirname(sourced_file)" - exec g:_uspy "module_path = os.path.join(sourced_file, 'pythonx')" - exec g:_uspy "vim.command(\"let g:UltiSnipsPythonPath = '%s'\" % module_path)" - exec g:_uspy "if not hasattr(vim, 'VIM_SPECIAL_PATH'): sys.path.append(module_path)" + " Import vim as we expect it to be imported in many places. + exec g:_uspy "import vim" exec g:_uspy "from UltiSnips import UltiSnips_Manager" endfunction