Reputation: 1069
I do something like "svn diff > /mystuff/current.diff". I want to view this .diff file with syntax highlighting.
jEdit does it, but it's a huge beast and it takes a while to start up. I want something lightweight/native.
Smultron/Fraise, TextWrangler, TextEdit, Dashcode don't seem to highlight .diff files.
FileMerge seems to want to generate diff files, not show you existing ones.
TextMate does the trick, but it's not free. I'd feel happier dropping $50 US if I was going to take advantage of it for anything more than a diff viewer.
Are there any alternatives to jEdit or TextMate that I should consider?
Upvotes: 3
Views: 4814
Reputation: 1580
In a terminal, one can also use the command line version of vim (which I believe comes with the Xcode command-line developer tools).
Unfortunately, the command-line version of vim is not set up to do syntax highlighting by default, so there's a little bit of additional magic necessary.
For those not versed in vim, you need to know these three commands in order to view diff files:
vim <file> // open the file in vim
:syntax on // turn on syntax highlighting
:q // exit vim when you're finished
Vim is good at automatically recognizing diff files, so it's usually not necessary, but if for some reason vim doesn't recognize your diff as a diff, you can tell it which syntax to use:
:set syn=diff
If your diff is of source code, you might also occasionally want to toggle back and forth between syntax highlighting of the diff and syntax highlighting of the code; you can also set the syntax to java
, c
, php
, mysql
, or sh
, among others.
Upvotes: 0
Reputation: 6612
Not an editor but you could use GIT or Mercurial and their Mac GUI clients to view the highlighted diffs in any files. The clients are free.
Upvotes: 0
Reputation: 45122
You could try an OSX GUI for vim, like the full-featured MacVim or the lightweight vim-cocoa...
(For a rough feature comparison, you can see this mailing list comment comparing them...)
Upvotes: 3
Reputation: 4624
I currently use DiffMerge and it works really well for me. (I'm forced to use StarTeam and it integrates well with it)
Upvotes: 0
Reputation: 12721
You might Versions, you can download a free demo version that will work for a limited time. You point it directly at you svn repository and you can compare versions. http://www.versionsapp.com/
Upvotes: 0