TextWrangler really shines when it comes to:
- more complicated single and multi-file search & replace function (such as bulk renaming of MySQL databases on your WordPress installations)
- opening and saving text files located on remote FTP servers (perfect for real-time template files and CSS adjustments)
Recently, however, I discovered it’s also capable of comparing text files and highlighting the differences between them, plus it’s super easy to do it.
In my early WordPress days I started out by simply modifying existing themes (editing files such as style.css, header.php, footer.php, single.php, functions.php etc.). This prevented being able to update those themes as I would inevitably lose all changes.
Simply browsing through all the files would’ve taken ages, so this is where TextWrangler came in – this is how I did it at least:
1. Open two documents (in my case, style.css in both the original and modified parent theme) that you’d like to compare
2. Click View > Show Files or type CMD + 0. This will open a sidebar with all opened documents.
3. Highlight the 2 files you want to compare in the Documents drawer, right click on them and select the option ‘Compare‘.
That’s it, TextWrangler will show you exactly which lines were modifed so you can easily copy them into your child theme’s style.css file.