Thanks Tony. Your suggestion helps!
After reading the manual more carefully, I find the solution.

-- --
Best Regards
Jerry Dai



On Thu, Apr 21, 2011 at 7:50 PM, Tony Mechelynck <
[email protected]> wrote:

> On 22/04/11 04:16, Jerry Dai wrote:
>
>> Hi,
>>
>> I use:
>> set efm=%EError%.%#,%C%f\\,\ %l,%C%.%#,%Z%m
>> to filter error messages like the following lines:
>>
>> /Error-[MFNF] Member not found
>> /users/jianzhen/core_tb_20110419_0000/verif/drv.sv <http://drv.sv>, 113
>>
>> "this.m_drive_req_event."
>>   Could not find member 'triggered' in class 'event', at
>> "/users/jianzhen/core_tb_20110419_0000/tools/verification/event.svh",
>>   32.
>> /
>> But in the error message is empty.
>> If I use:
>> set efm=%EError%.%#,%C%f\\,\ %l,%Z%m
>>
>> The error message will be:
>> /"this.m_drive_req_event."
>> /
>> But I want the error message to be:/
>> //  Could not find member 'triggered' in class 'event', at
>> "/users/jianzhen/core_tb_20110419_0000/tools/verification/event.svh",
>>   32./
>>
>> Anyone can help me?
>>
>> -- --
>> Best Regards
>> Jerry Dai
>>
>
> The 'errorformat' option is a tricky one, precisely because it allows the
> quickfix window to be used on the output of almost every compiler in
> existence, and of some programs like grep which aren't even proper
> compilers.
>
> I don't pretend to understand it, but I know that the important thing is to
> make Vim aware of the filepathname (or directory and filename), the line,
> and if possible the column(s) of each element to be pointed at, while
> avoiding false alarms (i.e. strings which resemble the strings announcing
> those elements but which are actually something else).
>
> Some compilers' output files are already pre-programmed in Vim, see ":help
> :compiler", or, if you have menus enabled, see the "Tools → SeT Compiler"
> menu. If you don't have the luck to find your compiler listed, and cannot
> change compilers in order to use a listed one, then the way to go is to read
> *very attentively* the chapter of the quickfix.txt helpfile beginning at
> :help error-file-format, possibly backtracking from a later part to an
> earlier one, going back to the beginning, going forward to something which
> is explained later, etc., all the while trying to (a) understand what Vim
> must be told in order to correctly find the path, file, line and column from
> the contents of your particular error file; (b) determine which
> 'errorformat' must be used to specify exactly that and never something else
> which the file may contain; (c) try the result, (d) understand why Vim
> didn't do what you expected [this is obtained by rereading the help text
> *extremely attentively* while trying to make out from it what a stupid
> automaton would make of your 'errorformat']; and finally (e) go back to step
> (a) until after step (c) you do get the desired result.
>
>
> Best regards,
> Tony.
> --
> A person is just about as big as the things that make them angry.
>

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to