• This repository has been archived on 05/Dec/2023
  • Stars
    star
    602
  • Rank 74,409 (Top 2 %)
  • Language
    Vim Script
  • License
    Do What The F*ck ...
  • Created over 13 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vim plugin for working with python virtualenvs

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 <tab>

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

More Repositories

1

bashful

A collection of modules to simplify writing bash scripts.
Shell
603
star
2

dircolors

Simple dircolors database
Python
25
star
3

python-dateutils

Utilities for working with datetime objects.
Python
15
star
4

vim-diffchanges

Shows the changes made to a Vim buffer
Vim Script
14
star
5

applescript-finder

Miscellaneous AppleScripts (mostly just wrappers for other stuff)
AppleScript
12
star
6

virtualenvwrapper.github

Plugin for virtualenvwrapper to automatically create projects based on github repositories.
Python
12
star
7

vim-journal

Encrypted journal based on calendar.vim and gnupg.vim
Vim Script
6
star
8

python-imageutils

Utilities for working with images.
Python
5
star
9

python-tvrage

Python interface to the TVRage television information database
Python
4
star
10

vim-reporoot

Change the directory to the root of the source code repository.
Vim Script
4
star
11

python-scriptutils

Various utilities for writing scripts.
Python
3
star
12

python-unicodeutils

Various utilities for working with unicode strings.
Python
3
star
13

vim2html

Convert source code to html using Vim
Shell
3
star
14

vim-opener

Open files and URLs in the appropriate viewer
Vim Script
3
star
15

applescript-alfred

AppleScript extensions for Alfred
AppleScript
3
star
16

vim-tokenize

Deal with delimited lines of text
2
star
17

python-pathutils

Utilities for working with paths.
Python
2
star
18

python-gtkutils

Utilities for working with GTK.
Python
2
star
19

vim-passwords

GnuPG encrypted, markdown formatted password storage
Vim Script
2
star
20

bootstrap-void

A mildly-opinionated Void Linux installer
Shell
2
star
21

mimemail

Command line mail user agent that uses the MIME message format.
Python
2
star
22

backer

Backup data with rsync using profiles and email notification
Shell
2
star
23

vim-numbered

Number items in a list.
Vim Script
2
star
24

bashful-ubuntu

Extensions to bashful for Ubuntu
Shell
2
star
25

wally

Wallpaper changer for the GNOME desktop environment
Python
2
star
26

htmlizer

Converts a bunch of source code to HTML
Shell
2
star
27

python-gnomeutils

Utilities for working with the GNOME desktop environment.
Python
2
star
28

pathtags

Command line utility for tagging files
Python
2
star
29

vim-spacepaste

Vim interface to spacepaste-based pastebin services
Vim Script
2
star
30

vim-movelines

Use the arrow keys to move/indent lines
1
star
31

vim-lastmod

Update a last modified timestamp when writing changes
Vim Script
1
star
32

gthemer

Runs a command in a different GTK theme.
Shell
1
star
33

igrep

Command line utility for finding images by properties like dimensions and aspect ratio
Python
1
star
34

vim-todo

Vim todo plugin based on @vreon's todo list syntax
Vim Script
1
star