File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ fun! pymode#virtualenv#Activate() "{{{
1313 call add (g: pymode_virtualenv_enabled , $VIRTUAL_ENV )
1414
1515python << EOF
16+ import sys, vim , os
17+
1618ve_dir = os.environ [' VIRTUAL_ENV' ]
1719ve_dir in sys.path or sys.path .insert (0 , ve_dir)
1820activate_this = os.path .join (os.path .join (ve_dir, ' bin' ), ' activate_this.py' )
Original file line number Diff line number Diff line change @@ -19,19 +19,6 @@ if !has('python')
1919 let g: pymode_virtualenv = 0
2020endif
2121
22- " DESC: Fix python path
23- if ! pymode#Default (' g:pymode_path' , 1 ) || g: pymode_path
24- python << EOF
25- import sys, vim , os, StringIO
26-
27- curpath = vim .eval (" getcwd()" )
28- libpath = os.path .join (os.path .dirname (os.path .dirname (
29- vim .eval (" expand('<sfile>:p')" ))), ' pylibs' )
30-
31- sys.path = [libpath, curpath] + sys.path
32- EOF
33- endif
34-
3522
3623" Virtualenv {{{
3724
4734" }}}
4835
4936
37+ " DESC: Fix python path
38+ if ! pymode#Default (' g:pymode_path' , 1 ) || g: pymode_path
39+ python << EOF
40+ import sys, vim , os
41+
42+ curpath = vim .eval (" getcwd()" )
43+ libpath = os.path .join (os.path .dirname (os.path .dirname (
44+ vim .eval (" expand('<sfile>:p')" ))), ' pylibs' )
45+
46+ sys.path = [libpath, curpath] + sys.path
47+ EOF
48+ endif
49+
50+
5051" Lint {{{
5152
5253if ! pymode#Default (" g:pymode_lint" , 1 ) || g: pymode_lint
You can’t perform that action at this time.
0 commit comments