Frage

So I am programming in C with VIM by using the make command to compile my code.
I would like to use the quickfix plugin to quickly move to the different compile errors but the only error that quickfix shows is the failed command in the make file.

I have failed to find any clues on google for this problem, is there something I could be missing to make this work?

War es hilfreich?

Lösung 2

I have finally solved the problem.

It turns out that if your shell is set to use FISH the output of the make command displays correctly but for some reason quickfix is unable to pick up any errors except for the failed part in the make file.

I solved the problem by switching vim to use bash instead by adding set shell=/usr/bin/bash to my .vimrc file.

Andere Tipps

The quickfix list (it's built in, not a plugin) parses the output of :make according to the rules in the 'errorformat' option, in order to extract file names, line numbers, and error messages.

Usually, you don't write those yourself, but you simply choose the appropriate compiler plugin. If your build uses GCC, you can set the compiler by

:compiler gcc

See :help compiler for details and a list of compiler plugins that ship with Vim.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top