|
1 | | -let g:pymode_version = "0.5.5" |
| 1 | +let g:pymode_version = "0.5.6" |
2 | 2 |
|
3 | 3 | com! PymodeVersion echomsg "Current python-mode version: " . g:pymode_version |
4 | 4 |
|
@@ -41,6 +41,9 @@ if !pymode#Default("g:pymode_lint", 1) || g:pymode_lint |
41 | 41 | " OPTION: g:pymode_lint_onfly -- bool. Check code every save. |
42 | 42 | call pymode#Default("g:pymode_lint_onfly", 0) |
43 | 43 |
|
| 44 | + " OPTION: g:pymode_lint_message -- bool. Show current line error message |
| 45 | + call pymode#Default("g:pymode_lint_message", 1) |
| 46 | + |
44 | 47 | " OPTION: g:pymode_lint_checker -- str. Use pylint of pyflakes for check. |
45 | 48 | call pymode#Default("g:pymode_lint_checker", "pylint") |
46 | 49 |
|
@@ -89,7 +92,7 @@ from pyflakes import checker |
89 | 92 |
|
90 | 93 | # Pylint setup |
91 | 94 | linter = lint.PyLinter() |
92 | | -pylint_re = re.compile('^[^:]+:(\d+): \[([EWRCI]+)[^\]]*\] (.*)$') |
| 95 | +pylint_re = re.compile('^(?:.:)?[^:]+:(\d+): \[([EWRCI]+)[^\]]*\] (.*)$') |
93 | 96 |
|
94 | 97 | checkers.initialize(linter) |
95 | 98 | linter.load_file_configuration(vim.eval("g:pymode_lint_config")) |
@@ -161,11 +164,18 @@ endif |
161 | 164 |
|
162 | 165 | if !pymode#Default("g:pymode_breakpoint", 1) || g:pymode_breakpoint |
163 | 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 | + |
164 | 176 | " OPTION: g:pymode_breakpoint_key -- string. Key for set/unset breakpoint. |
165 | 177 | call pymode#Default("g:pymode_breakpoint_key", "<leader>b") |
166 | 178 |
|
167 | | - call pymode#Default("g:pymode_breakpoint_cmd", "import ipdb; ipdb.set_trace() ### XXX BREAKPOINT") |
168 | | - |
169 | 179 | endif |
170 | 180 |
|
171 | 181 | " }}} |
|
0 commit comments