From 3208654c4e3d3513cd974a96e15ba2146b7cbb0d Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Wed, 9 Apr 2014 19:30:00 +0200 Subject: [PATCH] Do not map keys if 'g:_uspy' could not be set --- autoload/UltiSnips/map_keys.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/UltiSnips/map_keys.vim b/autoload/UltiSnips/map_keys.vim index 44e4082..eb570ba 100644 --- a/autoload/UltiSnips/map_keys.vim +++ b/autoload/UltiSnips/map_keys.vim @@ -1,6 +1,11 @@ call UltiSnips#bootstrap#Bootstrap() function! UltiSnips#map_keys#MapKeys() + if !exists('g:_uspy') + " Do not map keys if bootstrapping failed (e.g. no Python). + return + endif + " Map the keys correctly if g:UltiSnipsExpandTrigger == g:UltiSnipsJumpForwardTrigger