From 4a9fe8a46a7d8fb7a20c6674e0e0c7e0564bd168 Mon Sep 17 00:00:00 2001 From: Tim Ruffing Date: Wed, 9 May 2018 13:19:49 +0200 Subject: [PATCH] Use the same Python version as YCM When Python 2 and 3 are available, we need to use the version that is used by YCM to be able to access ycm_state. This commit adopts the version detection logic of YCM to ensure that we use the right version. Fixes #7. --- autoload/dyevim.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/dyevim.vim b/autoload/dyevim.vim index 7001058..570c404 100644 --- a/autoload/dyevim.vim +++ b/autoload/dyevim.vim @@ -26,8 +26,8 @@ set cpo&vim let s:script_folder_path = escape( expand( ':p:h' ), '\' ) let s:current_filetype = '' -let s:py = has('python') ? "py" : "py3" -let s:python_eof = has('python') ? "python << EOF" : "python3 << EOF" +let s:py = has('python3') ? "py3" : "py" +let s:python_eof = has('python3') ? "python3 << EOF" : "python << EOF" function! dyevim#Enable() if &diff