我的编译器和lint工具以两种不同的格式输出错误。我决定增量地设置我的errorformat,首先是lint,然后为编译器添加一个模式。
下面是我尝试匹配的lint输出行
"C:\Documents and Settings\user\Projects\MyProject\trunk\src\myfile.c",126 Info 754: local structure member 'myStructMember' (line 126, file C:\Documents and Settings\user\Projects\MyProject\trunk\src\myfile.c) not referenced我的第一次尝试是
set errorformat=\"%f\"\\,%l\ \ %t%s而且它起作用了。
然后,我尝试按如下方式进行设置
set errorformat=\"%f\"\\,%l\ \ %t\ %s然后它就停止工作了。
有人知道问题出在哪里吗?我确实通读了文档,但它没有帮助。
任何帮助都是非常感谢的。
发布于 2013-03-08 22:24:43
" Match the filename and line number
let &errorformat = '"%f"\,%l'
" Match white space, first character of error type, the rest of the characters
" of the error type, and white space again.
let &errorformat .= '%*\s%t%*\w%*\s'
"Match error number, whitespace and error message.
let &errorformat .= '%n:%*\s%m'https://stackoverflow.com/questions/15279413
复制相似问题