简体   繁体   中英

How to customize vim-syntastic?

I've written a python script. My vimrc contains:

Plug 'vim-syntastic/syntastic'
let g:syntastic_python_checkers=['pyflakes']

and I'd like to turn this kind of error into warning:

File.py|214 error| local variable 'rank_last_c' is assigned to but never used

and my code is like that:

def run():
    ...
    find(something)
    ...
def find(n):
    ...

Clearly, the function 'find(n)' is defined. But there's error like that:

File.py|149 error| undefined name 'find'

What should I do to customize my syntastic?

Use flake8 and you will be able to ignore errors easily.

But with your second example, I bet it's something in the lines of

class MyClass:
    def run():
        find(something)

    def find(n):
        ...

so you deserve the error...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM