By Shahed Nooshmand

BBEdit 13.2’s “Rescued Documents” feature

BBEdit 13.2 beta notes:

Have you ever had the experience where you make a new document, put some text into, and then later on, when you’re closing it (either alone or as part of closing a bunch of documnents), you click the “Don’t Save” button? And then, an ohnosecond later, you realize you’ve made a terrible mistake?

BBEdit has a new feature to protect your data: in the Text Files preferences, there is an option: “Rescue untitled documents when discarding changes”. When this option is on (as it is by default), and you close an untitled document (one that has never been saved to disk), and click “Don’t Save”, BBEdit will save a snapshot of that document’s contents to disk. If you realize you need that text back, it’s there — choose the “Rescued Documents” item on the Folders submenu on the BBEdit application menu, and you’ll get a Finder window with all of the snapshots.

BBEdit has long had a very useful feature for keeping track of saved files. When you make changes to a saved file and save it again, BBEdit will save an instance of the older version for you, and organises these versions by date and time as you keep changing and saving the file. There’s a BBEdit Backup directory in my Documents folder with days of file versions. Just before I read these notes, which came to my attention via BBedit’s Twitter account, I was looking for an older version of a file in my backups, like half an hour ago. It felt great.

The reason I mention this feature is that it made me wish for BBEdit to also keep track of the files I accidentally or even intentionally dismissed without saving, every single day. In hindsight, it’s shocking this wasn’t a thing already. Still, better late than never.

At some point I thought of doing this myself. I could just write a script that’s run with ⌘W in BBEdit and pops up a similar dialog, but instead of forgetting the file, it secretly saves it somewhere. This isn’t hard, but keeping track of all that crap and periodically deleting the really old ones is. I’m usually confident in my own code, but wouldn’t trust myself not to cause something horrible system-wide with some quick and dirty script I’d probably write in a fraction of the hour. But with BBEdit, I know my crap is in the right hands.