jmcantrell/vim-virtualenv — pull request #28 by brianclements (2014-06-28 16:57:51+00:00)
Title: Improve 'deactivate' method to support inherited venvs

Completely ravamped the way the plugin remembers old paths and
reinstates them. Instead of a "stash and replace" method for the entire
path (which accidently remembers inherited venv paths), now it will:

1. Detect inherited venvs using $VIRTUAL_ENV, remember them and set them
as the "current venv"
2. Deactivate any previous (inherited or former "current" venvs) before
activating any new ones
3. and do so by way of search and remove through the entire path for the
paths we want to remove.

This method allows for a much more robust workflow where one can be free
to start/stop/switch the same venvs from the shell or within vim.

Also, I've decided to depreciate the redundant (and not so robust) way
of checking and prepending the new $PATH in virtualenv#activate(). As
already stated in the comments, 'activate_this.py' already does this.