How to Find & Compare File Differences Side-By-Side with BBEdit for Mac
Need to compare two files side-by-side for differences? BBEdit for Mac makes finding and identifying file differences extremely easy with any compatible text format. This is a great solution for developers, programmers, writers, or anyone else who works with code, scripts, or plain text documents frequently and wants an easy way to check for differences in two text files while staying in the familiar GUI.
As already mentioned, we’ll be using BBEdit for this purpose. BBEdit is a fantastic text editor for Mac that is free to download and use with a slightly limited feature-set – though it’s still more feature rich than TextWrangler – and $50 to gain the entire apps feature suite. For our purposes here of finding and comparing differences in two files, the free version of BBEdit will get the job done. BBEdit is a Mac classic that has been around since long before Mac OS X even existed, and it’s one of the most powerful, fastest, and feature rich text editors you can get for the Mac.
Finding & Comparing Differences in Text Files with BBEdit
- Get BBEdit from the developer Barebones here (simple version is free) and install it as usual
- Open BBEdit if you have not done so already, then pull down the “Search” menu and choose “Find Differences”
- Click the file buttons next to “Left” and select the first document to compare, and then click the file button next to “Right” and select the second document you want to compare the first two, then click the “Compare” button *
- Browse through the differences between the two files, they will be highlighted as you work through the document, with a full list of differences at the bottom of the window
- Optionally, choose to “Apply” the differences one direction or another by clicking the “Apply” buttons with the appropriate arrow (left or right) near the bottom of the BBEdit Differences window
* Note you can also drag and drop text files into the Find Differences window if you’d prefer to place files into BBEdit to compare that way.
You can compare differences in any compatible text files side-by-side with BBEdit using this approach.
If you don’t want to use BBEdit for whatever reason, perhaps because you’re unable to download or install an app onto the Mac, you can use the command line diff tool to compare files as described here as well, or FileMerge, or if you use git than “git diff FileName.txt” works as well. Those options work best with code, scripts, and plain text, however, and if you’re looking to compare copies of rich text formatted items created in Pages or Microsoft Office than you’d likely want to use this method to compare versions of Word documents with Microsoft Word, which works with any .doc or .docx file (and recall that you can save or convert Pages documents to Word if need be beforehand).
Do you know of another approach to find differences in text files and compare them? Share in the comments below!
> (Me just now) is there.. will align files like Wikipedia..
Ah, I see that Beyond Compare will do this nicely. Another example of “never write a stupid-looking comment before actually looking at the software.”
Can someone recommend a compare tool that will align similar sections like how Wikipedia’s diff function works? When comparing source code (the inevitable result of naive “just make copies of all the source files” method of doing version control..), this would be *very* helpful. You’d have the totally-alike/mostly-alike sections actually aligned, so you could see what functions have been added, removed, comments added, etc without having to scroll up and down in each window.
git works well for this purpose:
git diff test.txt
But I prefer BBEdit.
May I ask where do I get the free version of BBEdit? I went to their site and I can only download the trial version. Looking at the about screen, my copy is good for 30 days.
BBedit remains free after the 30 day limit has expired, but it has a somewhat limited feature-set compared to the full version that is paid for.
According to their website, which they compare BBEdit with ‘free mode’ to TextWrangler:
This can be helpful:
BBedit is great, it’s my favorite text editor. Both free mode and full mode are fantastic, depending on what features you need or don’t.
I’ve been using BBEdit since OS X came out. It’s really starting to show its age at this point. When I submit feature requests, I usually get the response of “that would take a major framework change” or some such. If I could change one thing about BB, I would redo how it does clippings (code snippets) to be quicker to create and less verbose (#PLACEHOLDERSTART
END#) is crazy for example. Imagine reading through a large snippet with all that.
About a month ago, I finally abandoned Text Wrangler, and bought BBedit. That’s disturbing that they would respond this way to feature requests. We’re paying customers, not free loaders. And so what if it takes a “major framework change”? They will make it a paid upgrade anyway, so why should they care?
Beyond Compare is one piece of software I’ve been more than happy to pay for. By far the best comparison tool I’ve tried over the years, and works on Windows, Mac and Linux. https://www.scootersoftware.com/features.php?zz=features_list
Personally I prefer jEdit, which has a powerful jDiff plugin that let’s you apply individual differences in either direction. As well as lots of other goodies and works the same on a PC.
Yup, love jEdit too.
Another rather powerful text editor is Sublime Text, it is worth giving it a try: https://www.sublimetext.com