Switch Python Version for Vim & Syntastic

后端 未结 8 1139
忘了有多久
忘了有多久 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:48

    Not really, but you can get the python3 incompatible warning by install this package.

    Let's say your current Syntastic Python checker is python and you want to get python3 incompatible warning. In command mode, you can add py3kwarn to g:syntastic_python_checkers by

    :let g:syntastic_python_checkers=['python', 'py3kwarn']
    

    and switch to python2.x only

    :let g:syntastic_python_checkers=['python']
    

提交回复
热议问题