BBEdit turns 13 and makes Grep a whole lot easier

In human years, BBEdit turns well over 30 and with that age comes wisdom. Lots of it. Besides having become better at following Apple’s luminance schemes, the venerable text editor now offers a vastly simpler way to create Grep patterns, a Grep cheat sheet and the ability to create rectangular selections in documents with Soft Wrap Text set to active.

I’m not a coder, not even with CSS or HTML anymore, but I do regularly search for words and sentences even that you can’t find by simply looking for the actual characters. In other words, I search for patterns and BBEdit has always been a great help with that. In the past, though, I had to re-adjust myself to using Grep which is a patterns lookup language that I am sure is logical from a coder’s perspective but not mine and a lot of people like me. Setting up a Grep pattern took a lot of time and sometimes I just couldn’t make one work at all.

Enter BBEdit 13’s Grep Cheat Sheet. This mnemonic apparatus appears as a popup menu button in the Find, Multi-File Search, and Pattern Playground windows. It also works within the “Process Lines Containing”, “Process Duplicates”, and “Sort Lines” dialogue boxes. The menu provides some common Grep pattern idioms and brief descriptions and the best part is that it allows you to choose one that will then literally be inserted into the pattern you already figured out and select it. In the Find and Multi-File Search windows, choosing an item from the cheat sheet also turns on the “Grep” option.

That’s a first method BBEdit 13 uses to make Grep pattern creation better — as in more accurate and faster. The second way is the so-called “Pattern Playground” window. That one lets you interactively experiment with the behaviour of Grep patterns. This is my personal favourite. It makes creating complicated patterns much less a trial-and-error affair, because you can see exactly what will match and how that works. It reduced the time I needed to spend on Grep with my pattern-averse brain to a fraction of what I needed to spend without it — even the Cheat Sheet can’t compete with this.

But there’s a third method as well, although this one is for people who have a better understanding of Grep already. That’s the feature whereby editing a search string will highlight the results in the “target” document window. With most editors, this will work only with literal text, but BBEdit 13 makes this work with Grep patterns too. Of course, it will only work when the pattern is valid. As soon as it stopped being valid, the highlighting disappeared — but that’s useful in its own right, because it alerts you to errors you’ve made instantly.

As always, BBEdit upgrades have plenty of new and improved features and to list them all would take another five pages or so, but there’s one I don’t want to skip because it’s too useful to let pass under your radar: the ability to now make rectangular selections in documents for which “Soft Wrap Text” is turned on and act upon them — copy, cut, etc.

The rectangular selections are made in the actual text, not in the visual representation, so if the rectangular selection crosses a wrapped line, the wrapped portion of the line will not be highlighted, which could cause confusion, but not if you keep this in mind!

Conclusion: BBEdit is a tool, not just for coders or people working with simple HTML and CSS, but also for simple wordsmiths like myself. Yes, I write my articles in the Ulysses markdown editor, but for anything else I will open BBEdit.

BBEdit 13 retails for $49.99. You can use it for free for 30 days and try out all the features. After that, BBEdit goes into “Free mode”. You can’t use the advanced functionality in Free mode, but everything else will continue working as always.