Friday, August 24, 2012

How to use virtualenv in Vim ?

I added plugin virtualenv (https://github.com/jmcantrell/vim-virtualenv) into my
runtimepath.

I'm new to virtualenv. The Vim plugin virtualenv has a function for statusline
show the virutalenv name. I added it into my statusline option like this:
set statusline+=\ \%{virtualenv#statusline()}
And I also add this virtualenv segment into Powerline statusline.
call Pl#Theme#InsertSegment('virtualenv', 'after', 'hgrev')

I execute some commands:
$ virtualenv test
$ source bin/activate
$ python bin/activate_this.py
$ vim test.py
Then I do not see the virtualenv name in statusline, both original statusline
and Powerline statusline.

Does anybody knows what I should do ? Thanks very much.

--
[ stardiviner ] ^^&^^ {I hate all of you ! Leave me alone}
IRC(freenode): stardiviner \\ Twitter: @numbchild \\
GnuPG Key fingerprint
>>> 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433

No comments: