aboutsummaryrefslogtreecommitdiff
path: root/variables.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-11-25 10:14:01 +0800
committerGitHub <noreply@github.com>2019-11-25 10:14:01 +0800
commitc6d748ff099f18b56d5ab93a554cba1663a47b1d (patch)
tree064654c6f5a9429feb9d5587934dbcae2f6db5d2 /variables.vim
parentf66dba0e7aa950ecbc0441cb2f7dc7182c96aa22 (diff)
Fix a bug about Python 3 path
On Windows, there is not python3.exe symlinked to python.exe when you use Anaconda 3. There is just one python.exe, which will start Python 3. So we should check the existence of python instead of python3. It is the user's responsibility to make sure that Python 3 is installed instead of Python 2.
Diffstat (limited to 'variables.vim')
-rw-r--r--variables.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/variables.vim b/variables.vim
index 1750aa6..d527ee0 100644
--- a/variables.vim
+++ b/variables.vim
@@ -5,14 +5,14 @@ let g:loaded_python_provider=0
" Path to Python 3 interpreter (must be an absolute path), make startup
" faster. See https://neovim.io/doc/user/provider.html.
-if executable('python3')
+if executable('python')
if has('win32')
- let g:python3_host_prog=substitute(exepath('python3'), '.exe$', '', 'g')
+ let g:python3_host_prog=substitute(exepath('python'), '.exe$', '', 'g')
elseif has('unix')
- let g:python3_host_prog=exepath('python3')
+ let g:python3_host_prog=exepath('python')
endif
else
- echoerr 'Python3 executable not found! You must install Python3 and set its PATH correctly!'
+ echoerr 'Python 3 executable not found! You must install Python 3 and set its PATH correctly!'
endif
" Custom mapping <leader> (see `:h mapleader` for more info)