From b13015d47a79badbce381800e2cab9b597797117 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Sat, 11 Jul 2015 14:18:53 +0200 Subject: [PATCH] Remove sys.path manipulations. They were only needed for < 7.4 Vims which are no longer supported. --- autoload/UltiSnips/bootstrap.vim | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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