A long file paths is broken up over multiple lines in the Vim quickfix window which then for example does not allow to jump to the error location displayed in the qf.
The file (and the lines around) are diplayed in the quickfix window as (the example is the output from neomakes pdflatex)
|| Enter file name:
|| /long/path/to/file/.../loca
tionOfTexFiles/myTexFile.tex|144 error| Emergency stop.
|| read
to be able to follow to the file line by lnext/cnext I should have
/long/path/to/file/.../locationOfTexFiles/myTexFile.tex|144 error| Emergency stop.
For quickfix files I have the following relevant (in my view) settings which are set to:
setlocal nolinebreak
setlocal nowrap
setlocal textwidth=9999
So I am wondering how I can display the file path in one line within the quickfix window?
On
:make
, Vim invokes'makeprg'
, captures the output, and then parses it according to'errorformat'
. The latter does support multi-line error messages (cp.:help errorformat-multi-line
), but that is mostly for what I would call intentional linebreaks, as specified by the compiler. What you suffer from is unintentional linebreaks because of line wrapping (due to overly long paths).Now, I don't know about "neomakes pdflatex", but it looks like that tool creates the linebreaks, whereas it shouldn't, as Vim is capturing the output, and there's no receiving terminal (or user). Investigating in that direction (or opening an issue at the project's tracker) might be helpful.
The mentioned Vim options (
'linebreak'
,'wrap'
, etc.) have nothing to do with it. They apply to normal buffers; the quickfix buffer as such is not modifiable.Workarounds
A possible workaround might be to
:cd
first to a directory that is "closer" to the processed files (or even:set autochdir
); this might avoid the long paths in the output.Alternatively, you may "unmangle" the output by adding a
sed
stage after the compiler: