I'm struggling to get vim (8.0 (2016 Sep 12)) to parse the output of my build 
system, and need help with defining my errorformat. The default gcc efm appears 
to not be matching any lines, so in quickfix I see basically every line of make 
output, but the lines that actually contain errors show up with odd characters 
inserted.

Example make output:

make: Entering directory '/home/tblack/SourceRAM/la/Blocks'
ZYNQ_GPP src/avpcva.cpp
src/avpcva.cpp: In destructor 'virtual Blocks::AVPCVA::~AVPCVA()':
src/avpcva.cpp:152:49: error: 'class AVBC::STC' has no member named 'getHandle'
         uint16_t handle = stIter->second->getHandle();
                                                 ^

For the above make output, the quickfix list shows: 

|| make: Entering directory '/home/tblack/SourceRAM/la/Blocks'
|| ZYNQ_GPP src/avpcva.cpp
|| ^[[01m^[[Ksrc/avpcva.cpp:^[[m^[[K In destructor '^[[01m^[[Kvirtual 
Blocks::AVPCVA::~AVPCVA()^[[m^[[K':
|| ^[[01m^[[Ksrc/avpcva.cpp:152:49:^[[m^[[K ^[[01;31m^[[Kerror: 
^[[m^[[K'^[[01m^[[Kclass AVBC::STC^[[m^[[K' has no member named '^[[01m^[[Kget  
  Handle^[[m^[[K'
||          uint16_t handle = stIter->second->getHandle();
|| ^[[01;32m^[[K                                                 ^^[[m^[[K

The default errorformat for vim's gcc compiler plugin (amazingly) does not 
appear to beconfigured to support multi-line output (doesn't include any of %E, 
%C, %Z). I suspect that I just need to adjust my errorformat accordingly, but:

1. Would my using the default efm explain the odd characters in my quickfix?
2. I could use help with the specification of an efm that will correctly parse 
my make output. I have been reading the vim docs and browsing the web for days 
and still not making headway on demystifying and troubleshooting multiline 
errorformats in vim.

I took a stab at this, using the errorformat below. The first line attempts to 
define my multi-line error format start(%E)/continue(%C)/end(%Z).

set errorformat =%E%f:%l:%c:\ %trror:\ %m,%-C,%-Z%p^
set errorformat+=%D%*\\a:\ Entering\ directory\ [`']%f'
set errorformat+=%X%*\\a:\ Leaving\ directory\ [`']%f'

But it does not result in any different behavior from what I described above.

Thank you.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to