From ccf4ae7197ae77e528da39eeaa46b14f05318659 Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Thu, 9 May 2019 11:17:12 +0200 Subject: [PATCH] Handle virtualenv python without installing neovim package in every venv --- init.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.vim b/init.vim index 0a62092..e3ad2e3 100644 --- a/init.vim +++ b/init.vim @@ -1,3 +1,9 @@ +if exists("$VIRTUAL_ENV") + let g:python3_host_prog=substitute(system("which -a python3 | head -n2 | tail -n1"), "\n", '', 'g') +else + let g:python3_host_prog=substitute(system("which python3"), "\n", '', 'g') +endif + runtime packages.vim let $MYVIMDIR=split(&rtp, ',')[0]