Home Download Buy Blog Forum Support

How to diff two files?

How to diff two files?

Postby cirroz on Tue Sep 06, 2011 7:00 am

I'am a newb with ST2.
I don't understand how to diff two files with ST2 on Mac OSX.
Any suggestions appreciated.

Best regards,
Anton.
cirroz
 
Posts: 4
Joined: Tue Sep 06, 2011 6:55 am

Re: How to diff two files?

Postby firefusion on Tue Sep 06, 2011 7:38 am

Highlight both file names in the sidebar and right click. Diff is in the menu that appears.
firefusion
 
Posts: 218
Joined: Fri Oct 16, 2009 7:37 am

Re: How to diff two files?

Postby cirroz on Tue Sep 06, 2011 8:32 am

firefusion wrote:Highlight both file names in the sidebar and right click. Diff is in the menu that appears.

Only one item "Close" appears in that menu.
This method works in TextWrangler editor.
cirroz
 
Posts: 4
Joined: Tue Sep 06, 2011 6:55 am

Re: How to diff two files?

Postby Rich on Tue Sep 06, 2011 9:33 am

The above method works, but the files have to reside in the same directory as each other or it does not show the Diff on the right-click menu and it's not a side by side comparision.
Rich
 
Posts: 8
Joined: Tue Sep 06, 2011 9:30 am

Re: How to diff two files?

Postby jbjornson on Tue Sep 06, 2011 9:58 am

It only works from the open folders in the side-bar (not from the "Open files" section)...

It seems to work for me between two different directories.

The diff either puts a message in the status bar that the files are identical or it generates a unified diff result.
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: How to diff two files?

Postby cirroz on Tue Sep 06, 2011 10:40 am

jbjornson wrote:It only works from the open folders in the side-bar (not from the "Open files" section)...

It seems to work for me between two different directories.

The diff either puts a message in the status bar that the files are identical or it generates a unified diff result.


Thanks, jbjornson, diff really works from "open folders" in the side-bar.
And appears another question - is there a useful package with two panels diff like a WinMerge for Mac OS X?
cirroz
 
Posts: 4
Joined: Tue Sep 06, 2011 6:55 am

Re: How to diff two files?

Postby jbjornson on Tue Sep 06, 2011 11:31 am

Apparently there is a free diff tool included with Apple's development tools, XCode:
http://stackoverflow.com/questions/1870 ... r-mac-os-x

Download it from here:
http://developer.apple.com/technologies/tools/

There are some links to reduce how much of XCode you have to install here:
http://drupal.org/node/85184

There is also an open source tool called DiffMerge:
http://sourcegear.com/diffmerge/

I have no clue how useful these tools are...unfortunately I don't get to do too much development on my Mac at home.
jbjornson
 
Posts: 353
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: How to diff two files?

Postby cirroz on Tue Sep 06, 2011 12:11 pm

Thanks, man.
cirroz
 
Posts: 4
Joined: Tue Sep 06, 2011 6:55 am

Re: How to diff two files?

Postby kakubei on Tue Oct 25, 2011 9:25 am

Apple's tool is fine, but the best diff tool I've found for the Mac is (oddly enough) bbdiff which is part of the BBEdit command line tools. Of course, if you don't already own BBEdit it can be a stretch to pay $60 for it just for the diff tool when Apple's is free (Apple's is actually just a GUI for the CLI diff command which you can also use but is nowhere near as nice as having a GUI).

Does anyone know if there will be a diff tool with ST2?
kakubei
 
Posts: 58
Joined: Sun Sep 25, 2011 9:19 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 19 guests