python - 在 Syntastic for Vim 中仅对 Python 文件启用 pylint

标签 python vim pylint syntastic

我想使用“pylint”在 Vim 中检查我的 Python 代码。为此,我安装了 Syntastic 插件以及 Ubuntu 的“pylint”包。然后我通过在 .vimrc 中编写以下内容来指定要使用的检查器。

let g:syntastic_py_checkers = ['pylint']

但是如果我写:SyntasticInfo,我会看到两个检查器处于事件状态,“python”和“pylint”,我只想要 pylint。所以我尝试一起禁用 .py 文件的检查器。

let g:syntastic_py_checkers = []

但是:SyntasticInfo 仍然说我有两个事件的跳棋。

如何确保仅使用 pylint 检查器?

最佳答案

尝试使用syntastic_python_checkers代替syntastic_py_checkers:

let g:syntastic_python_checkers = []

let g:syntastic_python_checkers = ['pylint']

关于python - 在 Syntastic for Vim 中仅对 Python 文件启用 pylint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31959954/

相关文章:

python - flask-restful - 当前请求的资源类

vim - 用制表符替换 ":"以制作列

c++ - 编辑器核心缓冲区类型和语法突出显示

python - 我如何让 pylint 识别 twisted 和 ephem 成员?

python - 导入matplotlib.pyplot时如何修复 "object has no attribute"错误

python - 使用 Python 打印最长的字母子串,对于平局,打印第一个子串

python - python中的正则表达式匹配

vim 快速修复列表 : manipulate location?

python - Pylint:如何使用属性类指定自定义属性装饰器?

python - Pylint 和 Tornado - 在 @tornado.web.authenticated 上失败