Diff patch output saved to a file. How to see it syntax-colored

colorsdiff()syntax highlighting

I have a folder with subfolders that contains text files.

Every now and then I run a script that makes a copy of that folder tree and then creates a new one with fresh info.

After that, having the old version and the new version, I run diff to know what changed between the old version and the new, sending the output to a file:

diff myFiler.old myFolder > diff_report.txt

The question is.

– How can I see diff_report.txt syntax colored?

I don't mean to see the actual output colored like git does when it uses diff, but use such syntax-coloring to see the diff output that has already been saved to a file.

Best Answer

Any decent editor is able to highlight diffs conveniently. You can generally persuade your editor by using the .diff extension, or by setting the filetype to diff otherwise.