From 337bc6f76545c55e1532066058ab663c6eab0944 Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Sun, 31 May 2020 21:23:51 +0800 Subject: [PATCH] Fix vim8 python3 support in windows use PYTHON3_HOST_PROG for python3 --- config/main.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/main.vim b/config/main.vim index c99497ef5..16ad3c849 100644 --- a/config/main.vim +++ b/config/main.vim @@ -21,6 +21,13 @@ if has('vim_starting') endif if !empty($PYTHON3_HOST_PROG) let g:python3_host_prog = $PYTHON3_HOST_PROG + if !has('nvim') + \ && (has('win16') || has('win32') || has('win64')) + \ && exists('&pythonthreedll') + \ && exists('&pythonthreehome') + let &pythonthreedll = get(split(globpath(fnamemodify($PYTHON3_HOST_PROG, ':h'), 'python*.dll'), '\n'), -1, '') + let &pythonthreehome = fnamemodify($PYTHON3_HOST_PROG, ':h') + endif endif endif " Detect root directory of SpaceVim