Skip to Content
Skip to Table of Contents

← Previous Article Next Article →

ATPM 5.02
February 1999

Columns

How To

Reviews

Download ATPM 5.02

Choose a format:

Review: BBEdit 5.0.2

by Evan Trent, etrent@atpm.com

excellent

Product Information
Published by: Bare Bones Software
PO Box 1048
Bedford, MA 01730-1048
Phone: (781) 687-0700
Fax: (781) 687-0711
Web: http://web.barebones.com

What is it?

For those readers unfamiliar with BBEdit: shame on you. Now that we've gotten past that, you might want to consider reading my review of version 4.0.4 in ATPM 3.07. Having given BBEdit a rating of Excellent at that point in time, one can only imagine how excited I was to hear that a new version had been released.

BBEdit is a text editor, and a fully featured one at that. It offers sophisticated search and replace facilities, fast editing, syntax coloring, split scroll, file comparison, a full HTML editing and site management suite, and even an FTP tool.

Why Didn't it Suck to Begin With?

BBEdit is one of the best programs I have ever used, or as Bare Bones might say, it sucks a lot less than most other programs I've ever used. BBEdit is fast, powerful, flexible, intuitive, and possessive of many other fine qualities. Quite frankly I would have been hard pressed to improve upon it, but the folks at Bare Bones are simply caught up insuring that BBEdit continues to suck less and less. As a result they released version 5.0.1, and just as this article went to press 5.02. Both versions offered a number of noteworthy improvements, additions and bug fixes.

How Does BBEdit 5 Suck Less?

bbMarkupFor starters, Bare Bones completely revamped the HTML authoring suite from the ground up. While a lot of the old tools will seem familiar, and some perform identically, there are a number of welcome additions to the Markup Menu and likewise the HTML Palette. The syntax checker is now far more sophisticated and can detect malformed HTML. It is also updated for HTML 4.0.

Bare Bones chose to base the syntax checker on SGML (the language which defines how markup languages, such as HTML, are formatted) which brings forth several advantages in terms of "intelligent" syntax checking. A new Tag Maker function is another example of the new "intelligent" context sensitive capabilities in BBEdit 5. Simply place the insertion point at any given point in an HTML document (or make a selection using the cursor) and select Tag Maker from the Markup menu and a list of appropriate tags will appear. For example, <TD>and <TH>will be the only two options if you place the cursor directly after a <TR> tag. However if you place the cursor right after a <TD> tag a host of other options will appear. Likewise if you place the cursor inside of a <TD>tag, all of the attributes which that tag might define will be listed, but those already defined will not be. Snazzy! Similarly there is an Edit Tag command which pops up the appropriate dialog for the tag at which the insertion point is placed, assuming that there is a dialog for this tag in BBEdit (the <IMG> tag for example). Another cool feature: you can now pull up the Web safe palette from the Windows Menu, and from there you can drag colors into the document to insert their hex values where you like. Very nice!

IMAGE imgs/page1107.gif

BBEdit also has a new Format command which provides a method for retaining a consistent formatting style throughout an HTML document. The Format command can change all tags and attributes to uppercase or lowercase, choose whether or not to enclose attribute values in quotation marks, and decide whether or not to translate "entities" (accent marks etc.) found in attribute values to their HTML counterparts. However this tool can also be used to format the style of indentation and tag placement for an HTML document. For example, using the Hierarchical style of formatting puts indents one tab stop for every level of tag depth, plus one for the text between the tags. The text between the tags is placed on its own line. Gentle Hierarchical functions similarly but does not place the text between tags on a separate line, rather it leaves the text between the opening and closing tags. There are several other options as well. This feature provides a quick, consistent, and dependable method of formatting documents consistently. It would be great if the user could define his or her own method of formatting and make it a custom option for the Format command, but that's just on the wish list, and hardly a required feature.

Client-Side Server-Side Includes

BBEdit provides for a method of macro-like copy and paste commands analogous to #include "filename" in C/C++ and <!--#include virtual="filename"-->for an HTTP server that supports SSI (server side includes). The <!-- #bbinclude "filename"--> command includes the entire contents of the file "filename" at the exact location of the text <!--#bbinclude "filename"-->. The great thing about BBEdit's implementation is that it will work using the Preview feature, since BBEdit does all of the processing. With SSI, previewing will not render included documents because the documents are not being processed by the HTTP server. As a result it can be an HTML author's nightmare to deal with SSI, and yet SSI is such a fantastic time saver in many respects.

BBEdit's solution to this dilemma is elegant. SSI slows down HTTP servers because they cannot simply send out the raw HTML to the Web browser, rather they must parse it first for all SSI commands. This is fast for one HTML document but Web servers process gobs of these files every minute, and that extra overhead can add up. BBEdit's method enables the user to save time by simply putting in #bbinclude for commonly used headers, footers, or other template-like material. When it's time to publish the HTML and upload it to the site, BBEdit's Update Document command will replace each instance of #bbinclude with the text of the referenced file. This circumvents the SSI overhead issue altogether, while still saving the user loads of time and providing for a slick method of using templates.

Bare Bones is so slick that they couldn't simply provide a #bbinclude command without having some gnarly features. #bbinclude's can be nested up to 16 levels deep. They can take parameters too, and the values of the parameters will plugged in at placeholder locations in the #bbincluded file.

<!-- #bbinclude "nextPrev.script"
#pages#="index.html,page2.html,page3.html,page4.html"-->

Most slick of all, they can execute AppleScripts and use return values from them. The above example will call the on include handler of nextPerv.script, which returns links to the next and previous Web pages. Clearly Bare Bones is pushing the envelope with their no longer Bare Bones HTML editor. Unlike most applications, when BBEdit learns new tricks it learns them completely without sacrificing any of the speed or elegance we've come to expect.

There is also an improved Update Images command in version 5.0.2 which now will search through all the linked images in a file and automatically insert the height and width of the image. This makes for cleaner HTML because when the user's browser first draws the page, it will draw it correctly for images of the proper size, whereas without the height and width attributes the page would redraw when the images begin to download, which makes it very difficult to read a page while images are still downloading, as the text tends to jump around. There are also some options for the Update Image action. For example, you can set it to only update the height and width attributes for <IMG> tags which already have those tags present. Similarly you can tell BBEdit to ignore single pixel images, often used for spacing in tables and for other purposes.

Enough With the HTML Already!

IMAGE imgs/page1108.gifA number of non-HTML related changes have been made to BBEdit as well. Users can now define the command key equivalents for most BBEdit menu commands using the new Set Menu Keys under the Edit Menu. Similarly you can assign key commands to BBEdit Scripts now, which is slick. There is a nifty little feature in the Find Differences dialog which will enable the user to skip over files which are contained in folders whose names are enclosed in parenthesis. Some tweaks have been made to the AppleEvent suite which make life easier and less cryptic; this will mostly affect AppleScripters out there. Additionally a lot of new scriptable commands have been added to the AppleEvent suite, for example the Preview feature of the HTML suite.

IMAGE imgs/page1109.gifSome minor changes have been made to BBEdit's behavioral tendencies. The Quick Find dialog now highlights the text entry box, as an example. Syntax coloring now supports JavaScript, the function scanner deals with C++ namespaces and template member functions better, coloring of foreground text colors and window background colors is more sophisticated than before, the Perl function scanner now recognizes prototyped functions, etc. These are all very minor but welcome additions to BBEdit's existing arsenal of tools and time savers.

The Wish List

As much as I love BBEdit, and have always found it to be a wonderful product, there are still a few things it doesn't do that I wish it did. Although the new version sports a much more extensive AppleScript suite, it's still not recordable, which is to say you can't go into the Script Editor, press the Record button, and have your actions translated into AppleScript commands. I recognize that it represents a lot of work on Bare Bones' part but it would be a welcome addition. Also, the Text Colors setting in the Preferences dialog should allow the user to define words and define their respective colors, or at least define a "Custom" category and have all user defined words appear under that category and color choice, although that would be less desirable. Also, the Spell Checker still has an odd tendency to not make Replace the default button when the user types a word in the Replace With text item. The consequence of this is that pressing return after typing a replacement for the word in question results in skipping it rather than replacing it, and often times the user doesn't realize that this what has happened. These are small gripes though and I'm sure Bare Bones will address them as they have addressed even the pettiest grievances of their loyal user base in the past.

So What's the BB on BB's BB?

The Bottom Line on Bare Bones' BBEdit is this: If you own any version of BBEdit prior to 5.0.2, you need to update because, as difficult as it may seem to believe, Bare Bones has made some very cool changes to an already outstanding application. And if you don't own BBEdit you need to purchase it right now because it still doesn't suck, now more so than ever.

IMAGE imgs/page1110.gifCopyright © 1999 Evan Trent, etrent@atpm.com. Reviewing in ATPMis open to anyone. Contact reviews@atpm.com for more information.

Reader Comments (0)

Add A Comment





 E-mail me new comments on this article