jmcantrell/vim-virtualenv — pull request #23 by housleyjk (2014-05-03 06:00:03+00:00)
Title: Use subprocess to obtain correct site_packages #20

I ran into issue #20 because I have vim compiled with python 2 but I want to use syntax checking (via syntastic) and autocompletion (via YouCompleteMe). This code limits the PYTHONPATH mangling to just the cwd plus the site_packages that would be appended to sys.path if the environment where activated using the default interpreter for that environment. On my box, I get results for syntastic with flake8 and YouCompleteMe. I expect that this will also solve the problem for Python3 virtualenvs with neocomplete or other plugins.