Snow Leopard, BBEdit & QuicKeys

Because Snow Leopard does not install Rosetta by default, I’ve decided to abandon the last of my PowerPC applications: QuicKeys 2.1.1.

I’ve been a fan of BBEdit for a long time. At first, I relied heavily on QuicKeys to handle a lot of my keystroke automation within BBEdit:

  1. Add pre-defined text / templates.
  2. Insert HTML tags.
  3. Run AppleScripts.

However, I’ve encountered various compatibility issues with QuicKeys over time as I upgraded to newer versions of Mac OS X or BBEdit. Instead of waiting around for a fix, I’ve slowly migrated many of my QuicKeys functions over to BBEdit. After I installed Snow Leopard, I finally pulled the last automated function away from QuicKeys.

Adding Predefined Text or a Template. If you have to enter the same text repetitively in multiple documents, create a clipping. To do this, select the text pattern and save it as a clipping. In BBEdit, select © > Save Selection as Clipping… For some reason, the Clippings menu looks like an inverted copyright sign. Then, select Window > Palettes > Clippings. This summons the Clippings window where you can highlight your clippings and assign a hot key to them via the Set Key button.

Inserting HTML Tags. While you can use the above method to insert HTML code, the better method is to take advantage of BBEdit’s built-in hot key (or menu key) functions. Select BBEdit > Preferences to summon the BBEdit Preferences window. Select Menus from the left-hand column of the BBEdit Preferences window. In the right-hand column, expand Markup by clicking on the arrow to its left so that it points downward. If you find the HTML tag that you want from the sub-menus, select it and click on the Set Key button to assign a hot key. This method works better than just inserting the HTML tags as text because it inserts the opening and closing tags in the right place.

Run AppleScripts. The last remaining function that I had assigned to QuicKeys was to run an AppleScript that handled capitalization. Yes, BBEdit has a Change Case function, but it did not work exactly like I wanted. If I asked BBEdit to Capitalize Words, I end up with something like this:

A Rat In The House May Eat The Ice Cream

However, I prefer not to capitalize certain words, such as “in” and “the,” at least from the above text string. I have a bunch of other words that I do not ordinarily capitalize as well, such as “of”, “a” and “an.” While I love the Text Factory function, which is an easy way to run successive search and replace patterns, I can only run a Text Factory across an entire file and not an individual text selection. Hence, I created an AppleScript to handle this, which I had assigned to a QuicKeys hot key. Turns out that moving my existing script over to BBEdit was easier than I could imagine. I just had to drag the script to ~/Library/Application Support/BBEdit/Scripts/. The script then magically appeared in the Script menu (which looks like a curled document). To assign a hot key to this script, select Window > Palettes > Scripts. Select your script and click on the Set Key button to assign a keystroke.

0 comments… add one

Leave a Comment