BBPony 0.2
The Right Experience for Your BBEdit Search

BBPony 0.2 is a small collection of AppleScripts which aim to emulate aspects of the behavior of the deprecated modal find dialog in BBEdit 10. It's free for anyone to use or modify. For some of the long-time users of BBEdit who recently upgraded to version 10 this may be really handy (or, even a Pony ;-) Read the feature list to find out more!

Download BBPony
Mac OS X • Version 0.2 • Free

I believe BBPony improves the workflow and the experience when executing search operations in BBEdit 10. This may well be true for newer users of BBEdit, even if they do like the current find windows as they are. If you are interested to find out more about my motivation to write those tiny scripts you can read about the background of BBPony.

Features

Currently 0.2 is an experimental version which implements the following features:

Please note

If you have previously installed BBPony 0.1 you should uninstall it first. I figured I should change the shortcut for toggling the single-find window and the multi-find window to cmdF for two reasons. Firstly this removes the need for the (slow) UI scripting to be activated on your Mac and secondly works around a bug where cmdM would not expand the Markup widget if it was visible.

Installation

  1. Download BBPony_0.2.zip.
  2. Extract the archive. Once extracted, you have a folder containing a few AppleScript files with strange names like Search•Find….scpt, etc. It is very important that you don't change those file names. The file names have to be exactly like the BBEdit menu names to be attached to, using • as delimiter (see BBEdit's manual for details.)
  3. Copy all files from the BBPony folder with extension .scpt into BBEdit's Menu Scripts folder. The folder is usually located within the Application Support folder of BBEdit within the user's Library folder. The standard path is ~/Library/Application Support/BBEdit/Menu Scripts/. You may have to create parts of the path first. To do so, you can open a terminal window and paste the following command (including the quotes):
    mkdir -p ~/Library/Application\ Support/BBEdit/Menu\ Scripts
    Please note for Mac OS X 10.7 Lion: The user's Library folder is hidden by default. You can navigate to it in the Finder by clicking on the "Go" menu while holding down the alt key which makes Library appear in the list.
  4. Quit and relaunch BBEdit. This seems to be necessary only rarely, but it also doesn't hurt.

Check it out!

That's it, you're done! Try if all works as it should. Open a find window by hitting cmdF. Now hit cmdF again to see if it switches over to the multi-file search window. Hit cmdF again, BBEdit should switch back to the single file search window. Finally, open a single-file find window and hit cmdT and confirm that the cursor jumps to the first position of the underlying document.

Troubleshooting

If the Menu Script does not work at all please read and follow all the installation steps above once again very carefully.

Please also make sure, that you did not assign other shortcuts to the menu items "Search" > "Find…" and "Search" > "Multi-File Search…":

Feedback and, um... Support

I plan to evaluate a couple of other ideas for extending and improving BBPony in the future, but my private time for such projects is very restricted. Nevertheless, I you have any comments or ideas please let me know! I would appreciate to get your feedback for BBPony. On the other hand, please understand, that I will not be able to give any support. But you can always check back on this website, which I will keep updated as needed.

Background. Why BBPony in the first place?

With the release of BBEdit 10, Barebones has ultimately dropped support for the old modal find dialog which was available via a hidden preference until BBEdit version 9.6.

Many, like me, have never understood the reasons for doing away with the modal find dialog in favor of two separate search windows for single-file an multi-file searches. Honestly, this is something I always used to laugh about when using other text editors.

Moreover, the new non-modal windows are really misbehaving in my opinion. They do partly behave like normal text windows and partly like modal windows. You can drag and drop text to them, they stay open. On the other hand, they disappear (into the background) when you execute a search. And strangely, you can close them by hitting the Escape key. Try doing this with a normal text window!

Basically, I don't like them, I just can't live with them. I always, always hit cmdF when I want to search for something, because I usually test a new regular expression on a single file. I may later decide to execute the search against a complete project. So now I have to open another (almost the same) find window and end up having two find windows in the way which don't close and show up again, for example when I later switch windows using cmd> or cmd<.

Also, we BBEdit users have lost the ability to start searches at the top of the window. This used to be a killer feature, at least for me. It was just so slick. Yes, I have raised complaints with Barebones, and many more have expressed their disappointment in the BBEdit Talk group, but unfortunately to no avail.

So, what should I do? I still do think BBEdit is the best text editor around for the Mac and I'm not prepared to quit using BBEdit in favor of another piece of software. On the other hand I'm not convinced of switching to BBEdit 10 yet for many other reasons, just to name a few: HTML markup editing is a huge step backwards in functionality, file search paths are removed, saved grep patterns are now stupidly displayed in alphabetical order, etc.

Nevertheless, I'm still evaluating BBEdit 10, because there are things I like a lot in the new version. But the two separated find windows are just killing me. So what should I do?

AppleScript to the rescue!

Luckily, Barebones provides an extensive support for AppleScript in BBEdit. One of the cooler features of our beloved text editor is, that it allows to attach AppleScripts to menu items. BBEdit then calls dedicated handlers in the attached AppleScript before and after menu items have been selected. So I thought that this might be the key to fixing BBEdit's find dialogs (at least for me.)

As it turned out, I quickly came up with a solution for me that I liked good enough that I use it all day now. So I thought this might be worth sharing with the BBEdit community.

Revision History

Version 0.2, 2011-09-03

Version 0.1, 2011-08-19

Archived Versions

I recommend to upgrade to the current version of BBPony. You can download the most recent version of BBPony from this page. For the reference, I will also keep selected older versions and their accompanying sites in the archive.

Uninstalling BBPony

  1. Delete the script files belonging to BBPony from BBEdit's Menu Scripts folder. The folder is usually located within the Application Support folder of BBEdit within the user's Library folder. The standard path is ~/Library/Application Support/BBEdit/Menu Scripts/. Drag the following files into the trash. Depending on which version of BBPony you had installed may not have all of the files:
    Search•Find….scpt
    Search•Multi-File Search….scpt
    Search•Replace & Find Next.scpt
    
    Please note for Mac OS X 10.7 Lion: The user's Library folder is hidden by default. You can navigate to it in the Finder by clicking on the "Go" menu while holding down the alt key which makes Library appear in the list.
  2. Only if you had installed version 0.1 of BBPony: Open BBEdit 10's preferences, select "Menus & Shortcuts" and re-assign the default shortcut cmdF to the menu item "Search" > "Multi-File Search…". This is important.
  3. Only if you had installed version 0.1 of BBPony and if you had assigned the shortcut cmdM the menu item "Markup" > "Edit Markup…" prior to the installation of BBPony, assign it back to this shortcut.