views:

412

answers:

3

I have a warning I can not easily remove from my build, every time i run ":make" from inside vim the quickfix takes me to some header file I don't care about. How can I prevent VIM from doing this and only showing me warnings and errors I do care about?

+2  A: 

A quick and dirty way would be to write a simple shell script that runs your make and greps out the warnings you don't want to see. Then have vim use this script instead of make (Add "set makeprg=yourscript.sh" to your .vimrc).

sigjuice
+6  A: 

Check :h 'errorformat' (aka &efm), there are options to ignore warnings as long as you can recognize them with a pattern.

Luc Hermitte
+2  A: 

Learn from Bram himself.

I can vaguely remember he talks about this somewhere in this video

http://www.blinkx.com/video/7-habits-for-effective-text-editing-2-0/XzyBkWnse39By3Cqa2kSCw

He adds a filter to ignore some gnome warnings when he's compiling gvim.

The video's well worth watching anyway.

It's around the 30 minute mark

michael

related questions