It’s instructive, I believe, to think briefly about how Apple has aimed many of the marquee features of Mac OS X 10.7 Lion largely at people who either aren’t currently Mac users or who aren’t entirely comfortable with the traditional desktop metaphor (see “The Two Faces of Lion,” 9 June 2011). That’s not to say that Lion won’t provide long-time Mac users with some welcome features, but we old-timers don’t seem to be the target audience.
I draw your attention to Apple’s targeting to contrast it with how Bare Bones Software has gone about creating the latest version of their powerful text editor, BBEdit 10. Despite the fact that we at TidBITS write far more prose than code, BBEdit has been our writing tool of choice for some years, thanks to its support for the Subversion version control system, syntax coloring of the Markdown format for styling plain text, grep-based searching, and more.
Rather than go after new users who, for one reason or another, have not purchased BBEdit previously, Bare Bones has instead thought long and hard about how to improve key features in BBEdit for existing users. (New users will also appreciate the lower price of $49.99, or $39.99 through 19 October 2011.) And while programmers will find plenty to like in this update to BBEdit, a number of BBEdit 10’s new and improved features will be of particular interest to professionals who work with non-code text, including prose in Markdown format, Web pages in HTML, and EPUB-based ebooks. Let’s go through the main new features.
Dropbox-based Sharing of Support Files — The feature I most like right off is Dropbox-based sharing of application support files. BBEdit maintains a BBEdit folder inside
~/Library/Application Support that contains all sorts of essential files, including text factories, scripts, clippings, and so on. Until now, it has been fussy to sync those between multiple machines, and I’m always irritated when I find myself on my MacBook without access to a recently created text factory or clipping.
To share BBEdit’s application support files, create a folder in your Dropbox folder called “Application Support” and move (or if you’re just testing, copy) the BBEdit folder from
~/Library/Application Support/ to
~/Dropbox/Application Support/. (Do this when BBEdit isn’t running; it looks for the new location only at startup.) That’s all that’s necessary; BBEdit looks to Dropbox first for its support files and, if it doesn’t find them there, reverts back to the traditional location.
One note: There’s nothing BBEdit-specific about that Application Support folder in your Dropbox folder, and Bare Bones settled on this approach for sharing in the hope that other Mac developers interested in using Dropbox for sharing support files (for utilities such as 1Password and TextExpander) would consider using the
~/Dropbox/Application Support/ folder as well. Spread the word!
Speaking of sharing, sometimes you want to give someone a set of BBEdit support files that are associated with some project on which you’re collaborating. For that, you don’t want to use Dropbox, since your collaborator probably doesn’t want all your BBEdit settings. Instead, BBEdit now offers the concept of “packages,” which are collections of scripts, clippings, language modules, and text filters, all contained within properly named folders (
Contents/Clippings, and so on) within a folder that uses the .bbpackage extension and is stored in the
Application Support/BBEdit/Packages folder (local or in
Plus, something that’s new to me, though not to BBEdit 10, is that you can set certain options on a per-document basis with Emacs variable blocks. For instance, since we use .tb internally as the filename extension for Markdown, if we wanted to send a Markdown-formatted article to a contributor for checking such that they’d see Markdown syntax coloring, we could add this line at the top of the file to tell BBEdit to parse it as Markdown. For an interface to this feature, choose Edit > Insert > Emacs Variable Block (these blocks can go at the beginning or the end of the file).
<!-- -*- mode: markdown; -->
Faster Access to Documents — In an effort to make standard editing windows (which previously defaulted to a right-side drawer to list multiple open files) more like BBEdit’s project windows (which used a left-side sidebar to list multiple files), BBEdit 10 does away with the drawer entirely, relying instead on a multi-paned left-side sidebar.
For standard editing windows, the sidebar’s two panes show currently open documents at the top, with recently accessed documents listed below. For project windows, the currently open and recent documents panes are joined by a project pane that lists the files in the project (regardless of whether they’re open or have been used recently) along with a pane dedicated to a project-specific scratchpad and Unix worksheet. (The scratchpad is just a place to store random bits of text that might be useful; the Unix worksheet provides a Unix command-line environment like Terminal.)
To provide even faster access to documents in play, BBEdit 10 by default automatically saves and reopens documents that were open when you quit, much like Lion’s Resume feature. But BBEdit isn’t relying on Lion for auto-saving of documents or resuming; the feature works equally well in Snow Leopard. What’s truly cool is that BBEdit will happily quit even if one or more documents has unsaved changes, and when you start it up again, your documents will be in exactly the same “unsaved” state as when you quit. For those of us who seem to have a number of “untitled text” windows open at any given time, this is a nice touch. (A warning: don’t rely on this feature in favor of saving. I ran into one situation where two copies of BBEdit each had untitled files open but quitting and relaunching one copy opened not the untitled file it had open, but the two untitled files open in the other copy.)
HTML Markup Interface & Template-based Previews — One field where BBEdit is particularly popular is HTML authoring, and to help those who spend their days mucking about with HTML, BBEdit 10 now offers a completely revamped and far smarter user interface. Although the basic way you insert tags quickly in BBEdit is unchanged (hierarchical menus or a floating palette), BBEdit 10 now displays a popover that lets you set all the attributes of a particular tag, intelligently presenting just the appropriate options thanks to smarts obtained from BBEdit’s syntax checker. You can even Control-click an existing tag and choose Edit Markup to edit its attributes in the popover.
The other major feature in BBEdit 10 for HTML authoring is the capability to create and switch among HTML and CSS templates for previews within BBEdit. One of the problems with the prevalence of template-based content management systems is that you’re seldom creating an entire page of HTML. Instead, you create fragments, and the CMS puts your fragment together with the core HTML template and CSS files to generate the full page. Previously, previewing fragments in BBEdit was unsatisfying at best, since the fragments never looked anything like what the final page would; now you can create and set HTML and CSS templates into which your fragments are inserted before being previewed. This feature still won’t get around the problem of previewing fragments inside dynamically generated sites, but it will solve previewing problems for a number of users.
In-Zip Editing, including EPUB — The next major feature in BBEdit is one that probably won’t intrigue most people… until you get to the special case. BBEdit 10 can now not just look at text files inside Zip archives, you can also edit those files — manually or with text filters or multi-file searches — within the Zip archives, and BBEdit will save them right back inside the archive. This is no mean feat of legerdemain that will no doubt be useful in a variety of situations.
But where this feature really shines is with EPUB files, which are Zip-compressed collections of HTML and CSS files, along with a few other text-based support files and any necessary graphics and multimedia files. Previously, even doing something as simple as fixing a typo in an EPUB file has meant unzipping the file, making the change, and rezipping the file with the appropriate command-line incantations to get the right MIME type. Most people who work with EPUB regularly have automated this in some fashion (we have some Automator-based contextual menu commands that unzip and rezip EPUBs; they’re available for download, if you’d like to check them out). But even still, it would be far better to be able to edit the EPUB in place, without the intermediate files, and that’s exactly what BBEdit 10 provides.
Just open an EPUB file in BBEdit 10, find the correct file in the disk browser window that appears, and edit it like you would any other file. Once you save your changes, BBEdit updates the Zip-compressed EPUB file. It’s important to note that BBEdit isn’t aware of anything else in the EPUB file’s structure, so BBEdit won’t prevent you from rendering the EPUB invalid or warn you that you’ve done so. But, since BBEdit has such good scripting support, you could undoubtedly build in an EPUB validation script if you wanted.
Scripts and Text Filters, Oh My! — One notable change that might result in some initial confusion is BBEdit 10’s new distinction between scripts and text filters. Previously, BBEdit differentiated between types of scripts — AppleScripts, Unix shell scripts, BBEdit’s own text factories, and so on. While logical at one level, the script language isn’t generally the way most people think about scripts; they think about what the scripts do.
To that end, BBEdit 10 separates the different types of scripts into two functional types: scripts and text filters. A “script” in BBEdit 10 is part of a workflow; it operates on multiple files or updates Subversion or something like that. In contrast, a “text filter” manipulates only the contents of the frontmost document. The two types have associated folders in
/Application Support/BBEdit and you access scripts from the Scripts menu and text filters from Text > Apply Text Filter.
Although BBEdit 10 automatically tries to put existing text factories in the right folders, it may not be entirely accurate, so if you have something that’s a text filter but has ended up in the Scripts folder, just move it. Your old Text Factories folder sticks around, but it’s probably worth throwing it out manually to avoid confusion when saving new text factories.
BBEdit 10 can now treat Automator workflows as either scripts or text filters, depending on what they do.
New Preferences Window and Text Colors pane — Lastly, BBEdit 10 offers a complete overhaul of the program’s extensive Preferences window. It now lists the collections of preferences along the left, and resizes the window dynamically to hold the necessary options on the right. Some little-used options have been removed to reduce complexity, but you can still use
defaults write commands in Terminal to access every last option; see Help > BBEdit Help > Expert Preferences for a full list.
New as part of BBEdit itself is the Text Colors preference pane, shown above, which enables you to create different sets of colors, which you can then attach to different types of files. This could be useful, for instance, if you wanted Markdown files to have light text on a dark background, while HTML files would have dark text on a light background. As we work with an ever-increasing number of file types, a color-based reminder of what sort of file is open could be helpful.
Separate from the Preferences window is the new Setup window, accessible from BBEdit > Setup. It’s where you can define four different sorts of permanent settings that you might need to access repeatedly: bookmarks for BBEdit’s FTP/SFTP browsers, filters for the disk browsers, search patterns for the Find window, and sites for HTML authoring. These feel a bit unrelated, but the Setup window would seem to be a good way to collect and manage them.
Pricing and Availability — Suffice to say that if you’re a BBEdit user now, I’d recommend the upgrade highly; Bare Bones has done a good job of refining BBEdit’s interface and providing welcome new capabilities. If you aren’t currently a BBEdit user, but are looking for a powerful tool for editing and manipulating text of all sorts — even very large files — BBEdit is well worth a look. And given the new low price — see below — it’s even easier to recommend than in the past.
BBEdit 10 is available now from Bare Bones, although Apple still hasn’t yet approved it for the Mac App Store. From Bare Bones (and the Mac App Store, whenever Apple sees fit to approve it), BBEdit will list for $49.99, though it’s on sale for $39.99 through 19 October 2011. Upgrades from previous versions also cost $39.99, but anyone who purchased BBEdit 9 after 1 January 2011 is eligible for a free upgrade. That free upgrade timing has the salutary side effect of syncing up with the time that BBEdit has been in the Mac App Store, so people who bought directly from Bare Bones won’t pay more for this upgrade. A free trial version is available.