Code Monkey home page Code Monkey logo

vim-virtualenv's Introduction

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 sure which one to activate, you could always use tab completion

:VirtualEnvActivate <tab>

tab-completion

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

statusline

For more detailed help

:help virtualenv

vim-virtualenv's People

Contributors

jmcantrell avatar jtriley avatar miyakogi avatar blueyed avatar

Stargazers

Tsuyoshi CHO avatar Ruki avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

aoshiman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.