How to make Vim error list permanent using PyFlakes?

I want to use pep8 as my makeprg to check and fix the correspondence of PEP8 code (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 :copen :cp and :copen to navigate and view the error list in the QuickFix window .

But as soon as I change something in my python source file, the list of errors becomes empty, the QuickFix window loses its contents, and I can no longer navigate the list.

I suspect this is caused by PyFlakes, a Vim extension that instantly displays Python errors.

How can i fix this?

+4
source share
2 answers

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

let g:pyflakes_use_quickfix = 0

This actually stops pyflakes from using (and splitting) the quickfix window, which is enough for me.

+4
source
0
source

Source: https://habr.com/ru/post/1337286/


All Articles