screenshot of the Kate text editor welcome screen

One of the more difficult things about moving away from the Macintosh ecosystem was giving up BBEdit (“It doesn’t suck.®”). It is a phenomenally good text editor produced by people who seem to really care about their work, and get it from the users’ perspectives. In addition, I’d been using it for decades which made me quite facile. It was hard to move on.

At first, I just used vim. I’d been a vi user back in the Unix System V days and had continued with Vim, while using only a minuscule subset of its features. BBEdit had spoiled me into wanting a GUI editor, however, so I went searching.

The first editor I seriously tried was Kate: a free, open-source text editor that rivals BBEdit in features and power, though it seems (to me) to lack the cohesion of BBEdit. In truth, it feels unfair for me to compare the two when I used BBEdit for so long during a time when I was developing several fairly comprehensive software packages. I’m still definitely a Kate n00b, and likely to stay that way as I use it almost exclusively for maintaining this site (writing Markdown doesn’t demand the most from an editor) and the software development projects I’m doing these days are limited. In short, though, I’m impressed with Kate and, for me, it fills BBEdit’s shoes nicely.

I have stumbled upon a few helpful features, and also ones that have backfired. For example, in Markdown it’s often necessary to put [brackets] around a word or phrase. In Kate, if you have text selected and type an opening bracket, instead of replacing the selected text with the bracket, it inserts brackets around the text. Type another bracket and you get [​[double brackets]​], also a useful construct in Markdown. I’ve never taken the time to learn any more about this feature, but I use it regularly.

When I recently added the random page feature, though, I found I needed to do a lot of editing of the navigation links at the bottom of each page. Depending on the age of the page in question, the links look something like this:

[[garage painting|← previous]]|[[theend|next →]]

I started ripping through a lot of pages trying to edit the line, and I kept ending up with gibberish. I’m not 100% sure why. I was in a hurry and didn’t stop to investigate, but I suspect that the same code that helpfully puts brackets around selections also does weird things when trying to edit text with brackets. I’m sure that I could have avoided problems had I understood the feature, and equally likely there’s an easy way to turn it off. As it was, though, I was just trying to get some simple editing done and Kate was helping me way too much.

You just can’t please everyone.

—2p

PS. Just look at the sed command I ultimately used to make the changes automatically, and you can begin to appreciate how an editor that special-cases brackets might get confused:

sed -i -- 's/\]\]|\[\[/]]||[[random]]||[[/g' *.md

← previous||random||next →