I have a project that has a lot of warnings. I'm wondering (until I fix all the errors) how I can make my quickfix results more relevant?
My compiler script uses %t so it can differentiate errors from warnings:
CompilerSet errorformat&
CompilerSet errorformat^=%f(%l):\ %tarning\ C%n:\ %m
CompilerSet errorformat^=%f(%l):\ %trror\ C%n:\ %m
The two ideas I've thought of are:
- list errors first
- list files that aren't in my buffer list last
The second option seems pretty clever, but I'm not sure how to do it?
I assume getqflist()
, modify the returned list, setqflist()
. How would I sort the quickfix to show files in active buffers, files in loaded buffers, then unloaded files? Within each file, they should maintain the order given by the compiler. Ideally, entries that are not errors/warnings (have no file) maintain their position.