File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,19 @@ if !g:pymode_virtualenv || !g:pymode
77 finish
88endif
99
10+ call helpers#SafeVar (" g:pymode_virtualenv_enabled" , [])
11+
1012fun ! pymode_virtualenv#Activate () " {{{
13+
14+ for env in g: pymode_virtualenv_enabled
15+ if env == $VIRTUAL_ENV
16+ return 0
17+ endif
18+ endfor
19+
20+ call add (g: pymode_virtualenv_enabled , $VIRTUAL_ENV )
21+ echomsg " Enabled virtualenv: " . $VIRTUAL_ENV
22+
1123python << EOF
1224ve_dir = os.environ [' VIRTUAL_ENV' ]
1325ve_dir in sys.path or sys.path .insert (0 , ve_dir)
Original file line number Diff line number Diff line change 2222
2323" Add virtualenv paths
2424if g: pymode_virtualenv && exists (" $VIRTUAL_ENV" )
25- echomsg " Enabled virtualenv: " . $VIRTUAL_ENV
2625 call pymode_virtualenv#Activate ()
2726endif
2827
You can’t perform that action at this time.
0 commit comments