vim - 如何使用 Vim 和 Syntastic 忽略 Angular 指令 lint 错误

标签 vim angularjs syntastic

当我使用专有 html 属性时 Syntastic 的 lint 工具不断警告我时,这令人困惑,尤其是在使用 Angular 指令时。

enter image description here

这很快就淹没了我的 html 中的实际错误,减少了 linter 错误的值,并增加了视觉噪音。

有没有办法避免这种情况?

最佳答案

我问了这个关于 tidy errors in VIM on Syntastic's issue tracker 的确切问题。

添加到您的 vimrc:

let g:syntastic_html_tidy_ignore_errors=['proprietary attribute "ng-']

这将消除以 ng- 为前缀的任何属性的错误,为所有其他专有属性留下错误。

如果您有自己的指令的命名空间前缀,您也可以将其添加到此列表中。
let g:syntastic_html_tidy_ignore_errors=[
    \'proprietary attribute "ng-',
    \'proprietary attribute "pdk-'
\]

关于vim - 如何使用 Vim 和 Syntastic 忽略 Angular 指令 lint 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18270355/

相关文章:

haskell - Syntastic 和 hdevtools

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

Vim 游标用 .vimrc 换行

vim - Fuzzyfinder:有什么方法可以一次打开多个文件?

vim - 如何使用vim对.html文件进行无效的语法检查

javascript - Angular ng-repeat <li> 字符串换行

javascript - AngularJS 指令 - 将滚动条设置在正确的位置

parsing - Parse.js + AngularJS app关系数据查询问题

vim - 语法不起作用 : no errors

linux - 如何在控制台中从 "vim -y"退出?