Created
February 24, 2018 07:12
-
-
Save srishanbhattarai/41012cece60960a24b9a463786893f61 to your computer and use it in GitHub Desktop.
Cross platform Python paths for Neovim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (has('nvim')) | |
" Path to Python2 and Python3 binaries which are required by some plugins. | |
" A function that runs the shell `which` command and sanitizes the output. | |
function! Which(cmd) | |
return substitute(system("which " . a:cmd), "\n", "", "") | |
endfunction | |
let g:python_host_prog = Which("python2") | |
let g:python3_host_prog = Which("python3") | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment