Custom Links

This feature is likely way too specific for most people, but if you have a need for it, it can be a huge time saver.

From TextBuddy’s “Scripts” menu, choose “Reveal Secret Custom Links File”. You can edit this file to define custom regular expressions that TextBuddy will match in your text and link to specific websites.

What good is this?

Here’s a sample custom links file:

ABC-[0-9]{4}
https://mycompany.atlassian.net/browse/{{0}}

My company uses Jira to track bugs and features in our software. Each ticket is in the form of ABC-0000 (that’s “ABC” followed by four numbers).

Those two lines will instruct TextBuddy to highlight any text matching that pattern and make it a clickable link which opens the corresponding website.

So, text like this…

Hello, this is some text that refers to a bug with ticket number ABC-1234 and depends on a new feature ABC-7423.

will be automatically highlighted and linked like…

Hello, this is some text that refers to a bug with ticket number ABC-1234 and depends on a new feature ABC-7423.

I’ll often find myself needing to open a ton of Jira URLs from an email that aren’t linked – just the raw ticket numbers. Copy and paste into TextBuddy, and they’re instantly clickable.

When replacing text with your matched regex, {{0}} will be the entire matched pattern. And {{1}}, {{2}}, etc. will be the first, second, etc. capture groups from the regex.

Your regular expressions and replacement URLs should be on their own lines, one after another. So…

regex1
URL1
regex2
URL2
regex3
URL3

If your file has a syntax error or is not parsable for some reason, TextBuddy will update the file to highlight the error.