It is very helpful to be able to compare different code files to see their changes, specially when working in a team. Adobe Dreamweaver is my main choice when developing since I like the color highlighting theme, it has an FTP client included and a simple check-in/check-out functionality that doesn’t need to be set up like SVN and works in cheap shared hostings that don’t support any version control.
To compare files in Macintosh there are several applications and the best, lighter and faster to load is DiffMerge (works great in my old white Macbook), it is also free and open source so more than welcome. This is how you set it up in Dreamweaver so that you can compare files easily by right-clicking the file and selecting Compare with Remote Server:
Also when uploading a file Dreamweaver may warn you that the file in the server has been modified and you may overwrite someone else’s changes:
And also in the Synchronize files list:
It becomes really useful to see what has changed, once you click the Compare button this is how DiffMerge looks like:
Looks good, huh? Let’s get to work then!
Setting up DiffMerge with Dreamweaver
First thing to do is to download DiffMerge from the official site and install it, no need to open it.
Dreamweaver needs a shell command to open DiffMerge with both files. We will install a small script (10 lines of code) into the /usr/bin folder. To do this you first need to be able to view all hidden files:
defaults write com.apple.Finder AppleShowAllFiles YES killall Finder
Open Finder, go to Utilities and open Terminal. Paste the code above. Finder will restart and all your Finder open windows will close. If the code above doesn’t work then change YES to TRUE and try again.
Now go to Macintosh HD or your main drive and go to usr/bin:
Download this file and rename it as
Move diffmerge.sh to the /usr/bin folder, you will probably need to enter your Administrator password since that is a system folder.
Now go to Dreamweaver, open Preferences and go to the File Compare section. In there, paste this text:
Yes, it’s got
: instead of
/ but it’s how it works.
Save the settings by clicking OK at the bottom.
You are done! Now you can compare files and see what has changed, great to keep track of your peer changes and even some changes you made months ago and can’t remember.
You can hide the hidden files again by going to Terminal and typing:
defaults write com.apple.Finder AppleShowAllFiles NO killall Finder
Nice! You made it until the end of the post. Here’s an extra gift for you, a very useful tool to disable or customize the annoying startup sound in all Mac OSX, it is called Startup Sound and it installs in the System Preferences so it gets completely integrated with your system. It’s free too, download here.
TrendLiker.com lists hundreds of nice items and lets you know when they go on sale on Amazon.Looking for cool gift ideas?