Skip to content

Commit c24fa9a

Browse files
committed
Version 0.5.7
1 parent f7ddb73 commit c24fa9a

4 files changed

Lines changed: 44 additions & 52 deletions

File tree

Changelog.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
## 2012-02-11 0.5.7
5+
-------------------
6+
* Fix 'g:pymode_lint_message' mode error
7+
* Fix breakpoints
8+
* Fix python paths and virtualenv detection
9+
410
## 2012-02-06 0.5.6
511
-------------------
612
* Fix 'g:pymode_syntax' option

README.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ See (old) screencast here: http://t.co/3b0bzeXA (sorry for quality, this is my f
2828
Changelog
2929
=========
3030

31-
## 2012-02-06 0.5.6
31+
## 2012-02-11 0.5.7
3232
-------------------
33-
* Fix 'g:pymode_syntax' option
34-
* Show error message in bottom part of screen
35-
see 'g:pymode_lint_message'
36-
* Fix pylint for windows users
37-
* Fix breakpoint command (Use pdb when idpb not installed)
33+
* Fix 'g:pymode_lint_message' mode error
34+
* Fix breakpoints
35+
* Fix python paths and virtualenv detection
3836

3937

4038
Requirements

ftplugin/python/pymode.vim

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ endif
4343
" }}}
4444

4545

46-
" Paths {{{
47-
48-
" Fix path for project
49-
if g:pymode
50-
py curpath = vim.eval('getcwd()')
51-
py curpath in sys.path or sys.path.append(curpath)
52-
endif
53-
54-
" Add virtualenv paths
55-
if g:pymode_virtualenv && exists("$VIRTUAL_ENV")
56-
call pymode#virtualenv#Activate()
57-
endif
58-
59-
" }}}
60-
61-
6246
" Documentation {{{
6347

6448
if g:pymode_doc

plugin/pymode.vim

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
let g:pymode_version = "0.5.6"
1+
let g:pymode_version = "0.5.7"
22

33
com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version
44

@@ -21,16 +21,31 @@ endif
2121
" DESC: Fix python path
2222
if !pymode#Default('g:pymode_path', 1) || g:pymode_path
2323
python << EOF
24-
import sys, vim
25-
from os import path as op
24+
import sys, vim, os
2625

27-
sys.path = [
28-
op.join(op.dirname(op.dirname(vim.eval("expand('<sfile>:p')"))),
29-
'pylibs'), vim.eval("getcwd()") ] + sys.path
26+
curpath = vim.eval("getcwd()")
27+
libpath = os.path.join(os.path.dirname(os.path.dirname(
28+
vim.eval("expand('<sfile>:p')"))), 'pylibs')
29+
30+
sys.path = [libpath, curpath] + sys.path
3031
EOF
3132
endif
3233

3334

35+
" Virtualenv {{{
36+
37+
if !pymode#Default("g:pymode_virtualenv", 1) || g:pymode_virtualenv
38+
39+
call pymode#Default("g:pymode_virtualenv_enabled", [])
40+
41+
" Add virtualenv paths
42+
call pymode#virtualenv#Activate()
43+
44+
endif
45+
46+
" }}}
47+
48+
3449
" Lint {{{
3550

3651
if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint
@@ -160,27 +175,6 @@ endif
160175
" }}}
161176

162177

163-
" Breakpoints {{{
164-
165-
if !pymode#Default("g:pymode_breakpoint", 1) || g:pymode_breakpoint
166-
167-
if !pymode#Default("g:pymode_breakpoint_cmd", "import ipdb; ipdb.set_trace() ### XXX BREAKPOINT") && has("python")
168-
python << EOF
169-
try:
170-
import ipdb
171-
except ImportError:
172-
vim.command('let g:pymode_breakpoint_cmd = "import pdb; pdb.set_trace() ### XXX BREAKPOINT"')
173-
EOF
174-
endif
175-
176-
" OPTION: g:pymode_breakpoint_key -- string. Key for set/unset breakpoint.
177-
call pymode#Default("g:pymode_breakpoint_key", "<leader>b")
178-
179-
endif
180-
181-
" }}}
182-
183-
184178
" Documentation {{{
185179

186180
if !pymode#Default("g:pymode_doc", 1) || g:pymode_doc
@@ -197,11 +191,21 @@ endif
197191
" }}}
198192

199193

200-
" Virtualenv {{{
194+
" Breakpoints {{{
201195

202-
if !pymode#Default("g:pymode_virtualenv", 1) || g:pymode_virtualenv
196+
if !pymode#Default("g:pymode_breakpoint", 1) || g:pymode_breakpoint
203197

204-
call pymode#Default("g:pymode_virtualenv_enabled", [])
198+
if !pymode#Default("g:pymode_breakpoint_cmd", "import ipdb; ipdb.set_trace() ### XXX BREAKPOINT") && has("python")
199+
python << EOF
200+
try:
201+
import ipdb
202+
except ImportError:
203+
vim.command('let g:pymode_breakpoint_cmd = "import pdb; pdb.set_trace() ### XXX BREAKPOINT"')
204+
EOF
205+
endif
206+
207+
" OPTION: g:pymode_breakpoint_key -- string. Key for set/unset breakpoint.
208+
call pymode#Default("g:pymode_breakpoint_key", "<leader>b")
205209

206210
endif
207211

0 commit comments

Comments
 (0)