加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

为csslint消息找到vim efm

发布时间:2020-12-15 17:09:21 所属栏目:安全 来源:网络整理
导读:使用新发布的csslint,我想尝试将其挂钩到 vim作为.css文件的makefile.我很难让多行错误格式适用于输出. 到目前为止,我最好的结果是: au BufRead *.css set makeprg=csslint %au BufRead *.css set errorformat=%A%f:,%C%n: warning at line %l, col
使用新发布的csslint,我想尝试将其挂钩到 vim作为.css文件的makefile.我很难让多行错误格式适用于输出.

到目前为止,我最好的结果是:

au BufRead *.css set makeprg=csslint %
au BufRead *.css set errorformat=%A%f:,%C%n: warning at line %l, col %c,%C%m,%C%.%#,%C%.%#

但这并没有得到正确的行/列数.我在我的quickfix窗口中收到此输出:

|| csslint: There are 33 errors and warnings in bookie.css.
|| 
bookie.css||  1: warning Too many font-size declarations (13),abstraction needed.
bookie.css||  2: warning at line 3,col 3 Rule is empty. BODY {
bookie.css||  3: warning at line 12,col 12 Values of 0 shouldn't have units specified. padding: .5em 0em;
bookie.css||  4: warning at line 13,col 13 Values of 0 shouldn't have units specified. margin: 0em;
...

csslint的格式是:

csslint: There are 33 errors and warnings in bookie.css.

bookie.css:
1: warning
Too many font-size declarations (13),abstraction needed.

bookie.css:
2: warning at line 3,col 3
Rule is empty.
BODY {

有人看到我的efm有什么问题吗?或者有可能有用的东西?我试图不去编写另一个解析脚本来清理格式.谢谢您的帮助.

您需要使用双反斜杠来转义Vim错误格式中的逗号.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读