Switch Python Version for Vim & Syntastic

后端 未结 8 1088
忘了有多久
忘了有多久 2020-12-24 05:15

Is it possible to change the python version used by syntastic for syntax checking?

As the Issue https://github.com/scrooloose/syntastic/issues/385 indicates I could

8条回答
  •  有刺的猬
    2020-12-24 05:51

    I managed to convince Syntastic to handle Python 3 syntax with

    pip3 install --user flake8
    

    (to make python3 -m flake8 *.py work) and then, in vim:

    let g:syntastic_python_flake8_exec = 'python3'
    let g:syntastic_python_flake8_args = ['-m', 'flake8']
    

提交回复
热议问题