通过 vim+jslint 使用快速修复窗口

发布于 2024-08-21 11:33:40 字数 206 浏览 2 评论 0原文

我正在使用此处描述的 vim+jslint 组合,并且在弄清楚如何两者一起使用。我猜错误列表应该显示在上半部分,下半部分有实际页面?如果是这样,我该如何去做呢? (注意,我对快速修复窗口完全陌生,并且文档并不是最好地描述如何使用它)。

I'm using the vim+jslint combo described here, and am having problems figuring out how to use the two together. I'm guessing that the list of errors is supposed to show on the top half and the second half has the actual page? If so, how do I go about doing this? (Caution, I am completely new to the quickfix window, and the documentation isn't exactly the best at describing how to use it).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

行雁书 2024-08-28 11:33:40

quickfix 文档。 sourceforge.net/htmldoc/usr_toc.html#usr_toc.txt" rel="nofollow noreferrer">用户手册 Vim 帮助部分很好。你要记住,Vim 的帮助既有用户手册又有参考手册。后者更为简洁。

一般情况是,运行 :make 后,快速修复列表中会填充 'errorformat' 选项配置为解析的任何内容。您可以使用 :cn:cN 命令分别在快速修复列表中向前/向后移动。

The quickfix documentation in the user manual section of Vim's help is good. You have to remember, that Vim's help has both a user manual and a reference manual. The latter is more terse.

The general run down is, after running :make the quickfix list is populated with anything the 'errorformat' option has been configured to parse. You use the :cn and :cN commands to move forward/backward through the quickfix list, respectively.

小巷里的女流氓 2024-08-28 11:33:40

最后,我修改了 jslint 脚本,使其以 QuickFix 窗口的格式输出。我替换:

//print((e.evidence||'').replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"));print('');

print(a[0]+':'+e.line+':'+e.reason)

我认为

In the end I hacked the jslint script to output in the format for the quickfix window. I replaced:

//print((e.evidence||'').replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"));print('');

with

print(a[0]+':'+e.line+':'+e.reason)

I think

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文