baijum baijum - 6 months ago 11
Python Question

Configuration setting for Vim PEP-8 plugin to ignore errors and warnings?

I am using this plugin to detect PEP-8 errors and warnings in Vim:

I want to ignore few errors and warnings like E501 & W601 given in the backend pep8 tool:

When I looked at the plugin code, I can see it has support for this:

from pep8checker import Pep8Checker

args = vim.eval('string(g:pep8_args)')
select = vim.eval('string(g:pep8_select)')
ignore = vim.eval('string(g:pep8_ignore)')

if select:
args = args + ' --select=%s' % select

if ignore:
args = args + ' --ignore=%s' % ignore

pep8_checker = Pep8Checker(cmd, args)

But how do I use it ?


You need to set the variable g:pep8_ignore; you should put this in your vimrc.

let g:pep8_ignore="E501,W601"