>
> On Fri, 1 Oct 2010, Karthick Gururaj wrote:
>
>> On Fri, Oct 1, 2010 at 7:30 PM, Jeff Perry wrote:
>>>
>>> When I run my program from within vim
>>>
>>> :./xyz
>>>
>>> and the program errors out with a runtime error, e.g.:
>>>
>>> myprog: myprog.cpp:123: assertion 'x==1' failed
>>>
>>> vim tries to interpret the the output and jump to the offending line number.
>>>
>>> The problem is that in the example above it incorrectly interprets the filename as "myprog: myprog.cpp", so it opens a file with that name, which doesn't exist, and then tries to jump to line 123 in that non-existent file.
>>>
>>> My question is: Where in vim is this behaviour specified and how can I tweak it to do the right thing?
>>
>> See :help errorformat
>>
>> Try,
>> :set efm=%*[^\ ]%f:%l:%m
>>
You also have to get the output of xyz into a file:
./xyz 2>&1 | tee xyz.err
And for the rest see:
man tee
:help errorfile
Tinou
--
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
No comments:
Post a Comment