diff --git a/vimfiles/plugin/VimPdb.vim b/vimfiles/plugin/VimPdb.vim index e7ca786..d397ee5 100644 --- a/vimfiles/plugin/VimPdb.vim +++ b/vimfiles/plugin/VimPdb.vim @@ -14,15 +14,15 @@ " Initialization code " " -if !has('python') +try + let current_dir = expand(":h") + python import sys + exe 'python sys.path.insert(0, r"' . current_dir . '")' + python import VimPdb +catch map :echoerr 'No python -> no debugger ...' finish -endif - -let current_dir = expand(":h") -python import sys -exe 'python sys.path.insert(0, r"' . current_dir . '")' -python import VimPdb +endtry function! PdbInitialize()