Skip to content

BBEdit

Simplify updates to oft-updated text documents

Here on my blog, I've been tracking macOS release dates and rates for nearly 15 years—if I'm doing my math right, I've edited and republished the post 115 times since then. Until the most recent update, all 115 of those updates were pretty much done like this:

  1. Update a Keynote document that calculates the release rate data and contains the two charts in the blog post.
  2. Edit the text of the blog post in a text editor, with Keynote visible, replacing all instances of variable data—dates, numbers, size, rates, etc.—wherever they appear.
  3. Upload the graphs and publish the updated post.

While this isn't an overly complex task by any measure, the second step in particular has gotten more time consuming over the years, because of the length of the post: It now contains over 50,000 characters. That's lots of scrolling and looking for the few bits that change—and I'd often miss a date or a number in some portion of the post.

I thought there had to be a better way, and there is…and of course, the better way uses BBEdit. In particular, BBEdit's support for including one file in another—and using variables in the included file—makes my update task much simpler. If you have text files that receive regular updates, you may find this method of interest, as it can be a big timesaver.

[continue reading…]



Prevent BBEdit from importing ‘find’ strings

I use Bare Bones' BBEdit for most of my text editing, but there's one thing it does that drives me crazy: It will replace your "find" search terms with something you've used elsewhere. It goes like this…

  1. Set up a complex find/replace that you need to do a number of times in BBEdit.
  2. Do some finding and replacing, then switch over to another app to do some other stuff, including copying and searching.
  3. Switch back to BBEdit, open the Find dialog…and discover that the Find box now contains the text you used for searching in the other app.

Argh! Thankfully BBEdit saves previous queries, so it's a click to get it back. But I finally got mad enough to search for a better solution, and found it on a previously unknown to me expert preferences page on Bare Bones' site.

There's lots of good stuff on that page, but this section is the one of interest for the "Find" problem:

Like many Mac OS X applications, BBEdit supports the “Find Scrap”, a feature of the OS that enables sharing of the “search for” string between applications. Some applications put inappropriate content (such as Web search strings) on the Find Scrap, which can cause the “search for” string in BBEdit’s Find dialog to be replaced when you didn’t expect it.

Bingo! Quit BBEdit, open Terminal, paste this line, hit Return, and relaunch BBEdit:

defaults write com.barebones.bbedit FindDialog_UsesFindScrap -bool NO

No longer will your expertly-constructed Find string be replaced by interlopers from the outside world.