26

Is there any free software that will run on Windows 7 to show syntax highlighting for *.diff files generated from comparing files? I don't want to compare files, just view the highlighted output from software which has already compared two files.

8
  • 1
    .diff files are plain text. Are there any features in particular that you're looking for? Commented Oct 20, 2010 at 1:24
  • Yes. my fried has tortoise SVN installed and that highlight the places of changes in code. I need a free app to open .diff file which can highlight changes like tortoise SVN diff viewer. I don't want to install tortoise SVN just to open .diff file, is there any other lightweight portable apps available Commented Oct 20, 2010 at 1:32
  • So then you want a diff viewer, and not just a .diff viewer? Commented Oct 20, 2010 at 1:34
  • yes, but tortoisesvn is actually comparing the files... it's not just displaying a plain text diff file. Commented Oct 20, 2010 at 1:36
  • @Ignacio Vazquez-Abrams - no not a diff viewer i need any-name.diff viewer. what i want is available with tortoise svn but i'm looking for alternative Commented Oct 20, 2010 at 1:42

5 Answers 5

6

As always: VIM:

viewing a diff file

viewing 2 files in diff mode

9
  • 11
    Could you expand on this answer a bit? I see that it got accepted, but your three-word response isn't very helpful to future visitors of this question.
    – nhinkle
    Commented Jan 14, 2011 at 4:48
  • 2
    Actually, vim will do almost everything automatically :-). To compare two files, invoke vimdiff file1 file2 on the command line. If you use the GUI version gvim, al least on Windows you can mark two files in Explorer, then context menu "compare in vim".
    – sleske
    Commented Jan 14, 2011 at 9:19
  • 1
    vim is not always the answer, I have a 1200 lines long file and I will not use a tool like that
    – Kiwy
    Commented Nov 5, 2015 at 18:52
  • 3
    @akira, I'm still lost. How does one get from the first picture to the second?
    – Shitesh
    Commented Mar 15, 2017 at 11:54
  • 1
    @Shitesh gvimdiff before.txt after.txt
    – akira
    Commented Mar 16, 2017 at 15:11
10

Notepad++ can open any text file and has a variety of syntax highlighting including diff files

2
7

Free Options for diff viewing/editing/merging:

Wikipedia's recommendations: Comparison_of_file_comparison_tools

**Support Syntax Highlighting*

4
  • 14
    He doesn't need a file comparison tool, he needs a program that does syntax highlighting of diff files. Commented Oct 20, 2010 at 2:44
  • @Ignacio Vazquez-Abrams - Meld does syntax highlighting
    – ricbax
    Commented Oct 20, 2010 at 2:48
  • 10
    It does file comparison. It does not do diff file syntax highlighting. Commented Oct 20, 2010 at 2:51
  • 1
    Meld can not open diff files! Commented Aug 10, 2021 at 15:26
1

FreeDiff might meet your needs, but without know what exactly you are trying to do besides read it, its hard to say for sure.

1
  • 3
    I've tried this already and winmerge also . those are not I'm looking for. I don't want to compare 2 files. I just want to open .diff. Commented Oct 20, 2010 at 1:34
0

If you want to do syntax highlighting, then its a case of: What is in the files, in order that it be highlighted? For example, C source files are parsed differently to XML files.

Perhaps (shudder) emacs would suit?

1
  • 2
    Almost any text editor better than Notepad will do it. But he may be looking for a dedicated diff file viewer. Commented Oct 20, 2010 at 7:34

Not the answer you're looking for? Browse other questions tagged .