[英]VIM: how to set “errorformat” in my specified error message format?
In my system, we re-formatted all the build error message to have this format: 在我的系统中,我们将所有构建错误消息重新格式化为具有以下格式:
[2016-02-10 13:17:56.885597] [WARNING] [53171] [src/root/mylinux/test01.cpp:300]
As you could see, this format contain several parts: 如您所见,此格式包含几个部分:
1. The time stamp, day+hour+minute+second+microsecond
2. Some spaces and the [WARNING] or [ERROR] or [INFO] or [DEBUG], etc.
3. A process ID number like [53171]
4. The source file name + line number
I wish to use vim+quickfix to open this build error file, and navigate to source files+line number. 我希望使用vim + quickfix打开此构建错误文件,并导航到源文件+行号。 So how to set 'errorformat' string in my .vimrc? 那么如何在我的.vimrc中设置'errorformat'字符串?
Thanks a lot. 非常感谢。
It's a relatively unpleasant thing to parse with errorformat
to be sure, but you can do if you insist. 使用errorformat
进行解析确实是一件相对不愉快的事情,但是如果你坚持的话,你可以这样做。 One possible approach: 一种可能的方法:
let &errorformat = '[%m]%*[ ][%t%*[A-Z]]%*[ ][%n]%*[ ][%f:%l]'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.