Sometimes, when faulty outputs from compilations of C++ files/projects are to long, I like to redirect that output to a file, so that I can inspect it side-by-side with each of the offending files in turn.
The weak point of this, is that I lose the useful text format (colors, bold, ...) of errors and warnings, which really helps me spot the errors when quickly scrolling through the log file.
Thefore my questions are:
- Is there a
filetype
I can set on those log files so that they are shown with those coloring? - Or maybe I should redirect the output in another way that preserves some raw control sequences that the terminal uses to color text? (I know this is offtopic, but I'm asking here because I'd prefer the first approach, which is on topic.)
I know I can open :term
and run g++
there, so I have all Vim movement commodities in that terminal by pressing Ctrl-WN, but I'm interested anyway.