I am starting to use
quickfix to handle my latex compilation process. I found the
vim-latex package (https://github.com/vim-latex/vim-latex) but I am only interested in the quickfix part, and I want to use my own Makefile, so I merely copied https://github.com/vim-latex/vim-latex/blob/master/compiler/tex.vim to my
~/.vim/compiler/ and commented out the part that sets
makeprg. I also modified
if &errorfile ==# '' || &errorfile ==# 'errors.err' execute 'set errorfile=' . fnameescape(Tex_GetMainFileName(':p:r') . '.log') endif
if &errorfile ==# '' || &errorfile ==# 'errors.err' execute 'set errorfile=' . fnameescape(expand('%:p:r') . '.log') endif
I also put
The quickfix otherwise works fine, a sample quickfix list looks like,
(a lot of messages from latex log file)
|125 error| Undefined control sequence. \R
(more messages from latex log file)
|197 warning| ...
error is marked with red font and the
./abstract.tex is marked with light green font. If I go to the buffer containing the source file and execute
:cn, it jumps to the correct line in the source file with the next error/warning, so I believe
errorformat is set correctly.
:cn also works correctly in the quickfix list window, However, pressing Enter in the quickfix list window around
125 error or
197 warning does not seem to have any effect. Pressing Enter around
./abstract.tex|| does work though. This is a minor issue that I can live with, but I would still like to know any fix to it.
By the way,
:verbose nmap <CR> says "No mapping found" in the quickfix window.
My second and main question is as in the sample quickfix list above, there are errors as well as warnings. I am wondering whether there is a way to jump to the next error ignoring all the warnings, and vice versa. In the terminology of
quickfix, is there a way to jump to the next error of a certain type (
errorformat)? The simple command
:cn navigates through all the errors, regardless of the type.