Tag: bbedit

  • BBEdit 10 Custom Menu Shortcuts

    Previously, I mentioned that BBEdit 10 was missing a “Set Key” button to map menu items to a custom hotkey. Well, I heard back from support, and here’s the undocumented trick. Clicking on the empty space to the right where the other hotkeys are listed brings up a field for entering your new custom shortcut. If the new shortcut conflicts with an existing shortcut, you will be prompted with an option to remap the hotkey to the current menu item.

  • BBEdit 10 Text Factories

    Yesterday, I updated to BBEdit 10. Outside of the different UI for open documents, I didn’t notice anything truly different until I tried to access my collection of Text Factories.

    In BBEdit 10, the Text Factories still may be accessed under the Text menu, but the Text Factories have been renamed to Text Filter, and appear at the top of the Text menu instead of a third of the way down. Additionally, the hot keys for my Text Factories did not transfer over. To reset the hot keys, Window > Palettes > Text Filters brings up the menu for setting a key for the renamed Text Filters.

    If you are upgrading, I would suggest renaming the previous version to BBEdit-9-6-4.app. After installing BBEdit 10, I was still able to access the older version to look up all my old hot keys. If I replaced BBEdit 9 with BBEdit 10, I would have been in big trouble.

  • 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.