开发者

Using the quickfix window with 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).


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜