Archive for April 28, 2005

Thursday, April 28, 2005

Siracusa on Tiger

John Siracusa’s Tiger review is one of the best Mac articles I’ve ever read.

BBEdit Disk Browser and Terminal Scripts

In the previous post, I mentioned BBEdit’s disk browsers. These are one of my favorite features, but many BBEdit users don’t seem to use them. This is how I use them. Much of what I do revolves around three basic activities:

It’s essential that I be able to move from one activity to another quickly. Disk browsers combined with some AppleScripts make it convenient for me to use BBEdit as the hub. I can almost everything without using Xcode or the Finder.

To view files, or pick one to work on, I use disk browsers. They’re much faster than the Finder (or Path Finder, which I use when I need to move or copy files) to move up and down levels and peek at the contents of files or folders.

To edit a file in a disk browser, I select it (usually by typing the first few letters of its name) and press Return. This opens it for editing in BBEdit. Pressing Option-Return opens it in the default application, instead of BBEdit. Thus, if I have an HTML file I can press Return to edit it, or Option-Return to preview it in Safari. Or, if I have a package, I can press Return to treat it as a folder and view its contents in the disk browser, or Option-Return to open it as a package.

When I’m editing a file, I might want to view its parent folder or one of its siblings. Running this script opens a new disk browser window that makes it easy to do this.

Or, I may want to run shell commands on the file that I’m editing or on one of its relatives that I’m viewing in a disk browser. To do that, I run a script to open a shell worksheet or Terminal window with the proper working directory.

When I’m in a shell, I can use the bbedit tool to get back to an editing window (if I give it a file) or disk browser (if I give it a folder).

BBEdit 8.2

BBEdit 8.2 adds lots of Automator actions. It looks like you can do everything with Automator that you could do with Text Factories. There doesn’t seem to be any interoperability between Automator and Text Factories, however.

My favorite new feature is the pop-up menu of recent folders (or locked folder aliases) in Disk Browser windows. It sounds minor, but it will really affect the way I work. Also, I may be using the new Go To Next/Previous Function commands. I used to use those a lot in Emacs, because it doesn’t have a function pop-up. BBEdit does, but I imagine that it will be nice to jump around using the keyboard sometimes.