Often times I get way too many diagnostics from my compiler (eg., things beginning note:
which just provide context for the actual error), and I do not want to descend into these when I type :cn
.
Can the quickfix window contain tag-like references, to be visited with ^]
, and can some of the compiler's diagnostic output be converted to such references? That way :cn
doesn't have to descend down long lists of contextual output, but I do have the option of visiting those files easily if I need to.
For example:
In file included from /usr/include/c++/10/vector:67,
from test.cc:1:
/usr/include/c++/10/bits/stl_vector.h:653:2: note: candidate: ‘template<class _InputIterator, class> std::vector<_Tp, _Alloc>::vector(_InputIterator, _InputIterator, const allocator_type&) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _Tp = Test; _Alloc = std::allocator<Test>]’
653 | vector(_InputIterator __first, _InputIterator __last,
| ^~~~~~
It makes sense to me that the filename:line
pair on the In file included from
line should be something I could visit with ^]
, and I would prefer the filename:line:column
associated with the note:
line to be that way too, instead of being treated as the next error in the list.
:help 'errorformat'
doesn't match the output of your compiler. As-is, your question is lacking a) a reproducible example, b) the current value oferrorformat
, c) an indication of what compiler you use.'errorformat'
would get you everything you want. To help you get there, it would be great if you edit to include the things romainl requested.errorformat
already does match the compiler output, but I want to change its behaviour to insert tag references into the quickfix window rather than syntax errors.errorformat
(:set errorformat?
)?efm
is broken and must be fixed. There is only one valid error, there, and the rest is just context, where you should already be able to dogf
, for example. Again: what compiler?, whatefm
? where is the reproducible example. If you want us to help you change your brokenefm
's behavior, the least you can do is show it to us.