How to make Vim error list permanent using PyFlakes?

☆樱花仙子☆ 提交于 2019-12-05 01:47:20

问题


I want to use pep8 as my makeprg in order to check and fix my code compliance to PEP8 (Style guide for python code).

I used the command :set makeprg=pep8\ --repeat\ %, and when I do :make it works, the error list is populated and I can use :cn, :cp and :copen to navigate and see the error list in the QuickFix window.

But as soon as I change something in my python source file the errorlist becomes empty, the QuickFix window loses its content and I cannot navigate the list anymore.

I suspect that this is caused by PyFlakes, a Vim extension that highlights Python errors on-the-fly.

How can I fix it?


回答1:


pyflakes has an option that should solve your problem, just put this in your ~/.vimrc :

let g:pyflakes_use_quickfix = 0

This actually stops pyflakes from using (and breaking) the quickfix window, that is good enough for me.




回答2:


See this vim extension



来源:https://stackoverflow.com/questions/4814534/how-to-make-vim-error-list-permanent-using-pyflakes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!