Everyone needs a really good text editor. Sooner or later, you’re going to be faced with a job that requires you to clean up one or more huge text files, sort hundreds of lines of text, or eliminate the duplicates in a list. When that happens, you’ll be glad you can turn to Bare Bones Software’s TextWrangler ( Mac App Store link), which handles these tasks—and many more—with aplomb. Even better, it’s free for the downloading, either from the Mac App Store or directly from the Bare Bones Website.
“But wait,” you’re probably thinking. “Doesn’t a free text editor come with Mac OS X? You know, the one called TextEdit?” Well, yes, that program does exist. And it’s just fine for tasks such as reading the release notes for an application or creating gently formatted documents. But TextEdit is really a simple word processor—an app for typing and styling text. A text editor is a program for inputting and manipulating text, working with big text files, and making changes across multiple files at once, and TextWrangler is a shining example of the genre. (One limitation of a text editor is that it works only with plain-text files, not with styled text.)
Macworld’s previous review of TextWrangler, covering version 2.0, was nearly six years ago. TextWrangler is essentially a “lite” version of Bare Bones’ $99 flagship program, BBEdit, and just as BBEdit has improved dramatically since 2005, so has TextWrangler.
Like its big sibling, TextWrangler is beloved by programmers and other geeks because of its rich feature set for working with code. The program supports syntax coloring (displaying particular terms and code sections in specific colors) and code folding (selectively hiding and showing sections of a file) for a long list of programming and markup languages. You can access and edit documents residing on FTP and SFTP servers without manually downloading them to your Mac. And even if you’re not a programmer, you’ll appreciate the huge selection of text-manipulation tools, including complete control over line wrapping, case conversion, and line numbering; the ability to insert the contents of other files into the current document; and much more.
One of a text editor’s most important features is Find and Replace, and TextWrangler excels here. Instead of a modal search dialog—one that requires you to complete your finding and replacing before getting back to your document—TextWrangler’s search windows, for both the standard Find feature and the Multi-File Search feature, allow you to move freely between open documents and the search window. (You can actually perform find-and-replace operations on files that aren’t even open in TextWrangler.) If you know a bit about regular expressions (commonly referred to as grep), you can construct intricate search criteria that let you zero in on just the text you want to modify.
The Find All feature presents a two-pane search-results window, with the top pane populated by a list of search results. Selecting a result displays, in the bottom pane, a selection of the text containing the found string, with that string highlighted. You can edit the text right in the search-results window, so you don’t have to open the original file in a separate window. These editable text views are also used by operations such as browsing disks or language-syntax checking. The interface is convenient, saves you time, and reduces window clutter. (The history of your search-and-replace operations is also preserved, even when you quit TextWrangler.)
What BBEdit features don’t you get in TextWrangler? For starters, BBEdit includes an excellent set of tools specifically for creating HTML markup, including tag and attribute completion; a palette for HTML tags; integration with Adobe Dreamweaver; and live page previews. BBEdit’s Scratchpad window makes it easy to transform and edit text without needing to open up a separate document window. BBEdit also lets you create TextFactories, user-friendly scripts that allow you to perform repetitive tasks on demand (TextWrangler can run TextFactories but not create them). BBEdit’s text-manipulation features can also be invoked from within Automator workflows, and BBEdit’s AppleScript dictionary is more extensive. Bare Bones has published a chart comparing the features of the two programs.
Mac App Store rules, the version of TextWrangler available through the Mac App Store differs a bit from the version, also 3.5.3, available for download from the Bare Bones Website. Specifically, Bare Bones had to remove two features for inclusion in the Mac App Store. The first is a set of command-line tools for using TextWrangler as the editor for the
edit command in Terminal. If you prefer to use the Mac App Store version of TextWrangler, but you still want these tools, Bare Bones
provides them as a separate download on the company’s Website. The other missing feature is the capability to do authenticated saves, which, for example, allows you to save changes to files that you don’t own, such as hidden files that start with a period (.), files in hidden folders such as /bin and /usr, and system files. The company says it’s working on a solution for this limitation.
TextWrangler is an excellent text editor for anyone who needs to work with large amounts of text, text in large numbers of files, or both. It makes manipulating text a breeze, and its price just can’t be beat.
Tom Negrino is a book author and longtime contributor to Macworld. His latest book is Keynote for iPad: Visual QuickStart Guide (Peachpit Press).
Want to stay up to date with the latest Gems? Sign up for the Mac Gems newsletter for a weekly e-mail summary of Gems reviews sent directly to your Inbox. You can also follow Mac Gems on Twitter.