Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmcantrell/vim-virtualenv
Vim plugin for working with python virtualenvs
https://github.com/jmcantrell/vim-virtualenv
Last synced: 3 days ago
JSON representation
Vim plugin for working with python virtualenvs
- Host: GitHub
- URL: https://github.com/jmcantrell/vim-virtualenv
- Owner: jmcantrell
- License: wtfpl
- Archived: true
- Created: 2011-03-08T04:57:28.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2022-11-17T19:36:53.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T05:13:20.717Z (3 months ago)
- Language: Vim Script
- Homepage: http://www.vim.org/scripts/script.php?script_id=3486
- Size: 46.9 KB
- Stars: 599
- Watchers: 8
- Forks: 51
- Open Issues: 6
-
Metadata Files:
- Readme: README.mkd
- License: LICENSE
Awesome Lists containing this project
README
virtualenv.vim
==============When using :python or :!python, it will only have access to the environment outside of any virtualenvs. If you're working with packages that are only installed in a virtualenv, they will not be available to Vim.
*__Until now!__* The virtualenv.vim plugin will modify python's sys.path and the $PATH environment variable so that anything done with :python or :!python will behave like you would expect for the chosen virtualenv.
If compiled with python support, Vim will have a :python command, but this will be tied to whatever version is the default on your system. If this is the version of python that you use, or you're using a Linux distribution with a sensible package manager (like Debian or Ubuntu), you likely will not have to do anything more than install the plugin. If not, then you will likely have to recompile vim with your version of python.
Usage examples
==============Deactivate the current virtualenv
:VirtualEnvDeactivate
List all virtualenvs
:VirtualEnvList
Activate the 'spam' virtualenv
:VirtualEnvActivate spam
If you're unsure which one to activate, you could always use tab completion
:VirtualEnvActivate
If the shell that started vim had $VIRTUAL\_ENV set, omitting the name will
imply usage of this value.If you're a virtualenvwrapper user and have $PROJECT\_HOME set, omitting the
name will try to guess which virtualenv to activate based on the current
filename.You can even show the current virtualenv in the statusline with the included function.
Or, for those with a properly configured Powerline (the virtualenv segment is not enabled by default), your virtualenv indicator will toggle on or off accordingly.
For more detailed help
:help virtualenv