I’ve started going through and cleaning up my large collection of TextExpander snippets, starting with the ones I share publicly. In the process I’m moving away from my homebrew snippet sharing system to using TextExpander’s new(ish) public snippet groups. Once I’ve pruned and updated all of the groups in the te-snippets tool, I’ll redirect that page to a list of my publicly shared snippet groups.

Much like my custom tool, TextExpander sharing lets you define your own prefixes for the group, and it doesn’t take a bunch of XML foolishness on my end to make it work. I like it.

The first group up for a refresh was my “Tools” group, which is kind of a general collection of tools for text, Markdown, and miscellaneous tasks like getting the front Finder window path.

You can find the new group as “Brett’s Tools” on TextExpander.com. Some of its original contents are being moved into more specific groups, and a bunch of the snippets got updates. Only a few had to be removed due to APIs being discontinued or other issues that have popped up.

There’s a new snippet for creating obfuscated mailto: links. It pops up a fill-in for link text, email address, and optional subject line, then spits out an HTML tag that uses a combination of JavaScript and unicode encoding to completely obfuscate the link, including the “mailto” part, so bots are less likely to pick them up. I’ve gotten to the point where I’m getting as much spam from contact forms as I ever got from just putting my email address out there, so in a lot of applications I’m just back to using mailto links. Obfuscating is of questionable value overall, but the general consensus on it is “it’s better than nothing.” This snippet makes it easier to just do it.1

I also updated the “swear” snippet (which turns your swears into “f#@!” for you) to include first letter of censored word. It’s just more fun that way.

Snippets that generate urls now assume https, rather than http.

The “Slugify” snippet (which turns “hey there” into “hey-there”, mostly for file naming purposes) now removes all non-alphanumeric characters and compresses multiple hyphens.

Anyway, check out the shiny new result here. Watch for more updates soon!

  1. There is, of course, a concern about using JavaScript because it’s possible a user won’t have JavaScript enabled, in which case they’d be left with a non-functioning link and no way to contact you. I have an alternate version of this that uses entity encoding, but it’s so rudimentary that I feel like you might as well just use plain text.