klen/python-mode — Issue #57: Pylint and Pyrun doesn't work on Ubuntu 10.04 GVIM 7.3
Author: spacelis
Created: 2012-02-21 10:58:58+00:00
State: open

On my Ubuntu 11.04 64bit with VIM 7.3, the version 0.5.8 doesn't work well, as PyLint always gives 0 quickfix and Pyrun outputs mixes up with "Error while processing function".
Here is a patch that works for me.

diff --git a/autoload/pymode/run.vim b/autoload/pymode/run.vim
index 23fc6a9..083fdbf 100644
--- a/autoload/pymode/run.vim
+++ b/autoload/pymode/run.vim
@@ -2,9 +2,10 @@
fun! pymode#run#Run(line1, line2) "{{{
if &modifiable && &modified | write | endif
redi @">
- sil!py execfile(vim.eval('expand("%s:p")'))
+ !python %
redi END
call pymode#TempBuffer()
- normal Pdd
+ normal P3ddGk2dd
+ %s/
//g
wincmd p
endfunction "}}}
diff --git a/plugin/pymode.vim b/plugin/pymode.vim
index 611c72f..1dd2941 100644
--- a/plugin/pymode.vim
+++ b/plugin/pymode.vim
@@ -108,7 +108,7 @@ from pyflakes import checker

# Pylint setup
linter = lint.PyLinter()
-pylint_re = re.compile('^(?:.:)?[^:]+:(\d+): \[([EWRCI]+)[^\]]*\] (.*)$')
+pylint_re = re.compile('^(?P[RCWEF]):\s*(?P\d+),(?P\d+):(?P