pylint in Vim
I’m a big fan of Vim and I do lots of Python programming and I like to ensure my code passes static analysis (using pylint). To hook these together I added the following to my .vimrc
file.
autocmd FileType python set makeprg=pylint\ --reports=n\ --msg-template=\"{path}:{line}:\ {msg_id}\ {symbol},\ {obj}\ {msg}\"\ %:p autocmd FileType python set errorformat=%f:%l:\ %m
When you have a python file open :make
runs pylint and shows the results in the quickfix window so you can jump to the line with the problem.
Thank you – just what I was looking for, now in my vimrc 🙂
Awesome, how do you automatically get the quickfix window?
I had to add an extra line to vimrc:
nmap ,m :makecopen