diff options
| author | jdhao <jdhao@hotmail.com> | 2019-11-05 01:05:13 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2019-11-05 01:05:13 +0800 |
| commit | d290d79bb9fc218eba6ba53e5c3f74bb71b84176 (patch) | |
| tree | 5b229a0d731f097719548879f64941844c589353 /variables.vim | |
| parent | f426ec3c4a9f29f0fb0af2755c3ffc450a1e1357 (diff) | |
Simplify the way to get correct python3_host_prog
Diffstat (limited to 'variables.vim')
| -rw-r--r-- | variables.vim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/variables.vim b/variables.vim index febf67d..f9593ae 100644 --- a/variables.vim +++ b/variables.vim @@ -1,20 +1,20 @@ "{ Global Variable "{{ Builtin variables " Path to Python 3 interpreter (must be an absolute path), make startup -" faster. See https://neovim.io/doc/user/provider.html. Change this variable -" in accordance with your system. +" faster. See https://neovim.io/doc/user/provider.html. if executable('python') - " The output of `system()` function contains a newline character which - " should be removed, see https://vi.stackexchange.com/a/2868/15292 - if has('win32') - let g:python3_host_prog=substitute(system('where python'), '.exe\n\+$', '', 'g') + if has('win32') + let g:python3_host_prog=substitute(exepath('python'), '.exe$', '', 'g') elseif has('unix') - let g:python3_host_prog=substitute(system('which python'), '\n\+$', '', 'g') + let g:python3_host_prog=exepath('python') endif else echoerr 'Python executable not found! You must install Python and set its PATH!' endif +" Disable Python2 support +let g:loaded_python_provider=0 + " Custom mapping <leader> (see `:h mapleader` for more info) let mapleader = ',' "}} @@ -37,4 +37,4 @@ let g:loaded_tarPlugin = 1 let loaded_matchit = 1 let g:loaded_matchparen = 1 "}} -"} +"}} |
