Customising CamelCase link detection functionality

Hey all, I’m fairly new to TiddlyWiki, and I read about Namespacing in the Grok TiddlyWiki Naming Conventions seciton.

I like the idea of adding XX: prefixes to my Tiddlers, but being super lazy, I’d like to do this without creating a link explicitly. Is it possible to modify the CamelCase link detection to incorporate some preceding characters and a colon (or whatever)?

Thanks in advance :slight_smile:

G’day,

EDIT: Hey @pixe , first post! Welcome to TiddlerHood !

My suggestion here involves modifying a core tiddler. It might be a good idea to remember, when upgrading to a new version of TiddlyWiki, to exclude this core tiddler from the TiddlyWiki upgrade process, and then modifying the same core tiddler again in the upgraded TiddlyWiki. (That may be clear as mud, but easy to show in pictures when the time comes.)

In the $:/core/modules/config.js tiddler, you want to tell the process that “:” should be treated the same as a lowercase character. (see the screenshot below)

So in the “exports.textPrimitives …” part, where lowerLetter is defined as being between a and z inclusively, just add the colon right after the “z”.

Because this is a javascript macro, you’ll have to save the TiddlyWiki after modifying and saving the core tiddler, close, and reopen the TiddlyWiki for the change to take effect.

From that point on, TiddlyWiki’s CamelCase auto-link mechanism will consider colons as lowercase characters, and should not impact anything else that I can see.

Maybe the Official Plugin Freelinks is what you want. It turns any text that matches a tiddler title into a link.

1 Like

For some reason, I was thinking the Freelinks plugin would over time slow rendering down because wouldn’t it scan all content to identify potential links?

I haven’t played around with it to know any better.

Where is the download for that plugin? I’m having a hard time finding it for some wonky reason.

EDIT: Found it. And I find it obviously slows things down to my threshhold of annoyance. (Using a copy of TiddlyWiki.com). But I am very easily annoyed by performance degradation of any kind. If you get easily annoyed setting up links and/or CamelCase, then you might really appreciate the Freelinks plugin. (Gotta pick whichever reduces the most amount of irritation, I say.)

TiddlyWiki.com is pretty large. Freelinks will also allow you to select which tiddlers get activated to reduce overhead.

To find Freelinks, go to settings, plugins, get more plugins, open plugin library. Then scroll or type “free” into the search box.

Thanks for the welcome @Charlie_Veniot. Modifying the core tiddler did exactly what I needed.

Thanks again!

Good stuff !

I’m not aware of any existing video that shows how to upgrade a TiddlyWiki and deal with custom changes to core tiddlers.

Maybe I’ll do a related quick and dirty video sometime.

It is not complicated at all, but worth a show and tell for the sake of reassuring.

Even if this did slow rendering having a toggle to activate Freelinks plugin when necessary makes sense.

  • With performance issues its important to keep in mind the functionality you get or avoid.
  • A lot can be done to improve performance, only necessary on larger wikis, but why remove functionality when, if you need it you can just make it available with a click?

When quoting somebody in a discussion group, it can sometimes rightly sometimes wrongly be taken as a reply to the individual who is quoted.

I sure hope that wasn’t a reply to me, because I really could not care less for the functionality provided by Freelinks, and I cannot stand CamelCase.

Sure, it is great for people who want those things. But I desperately never want those things.

A pitch for the virtues of Freelinks in this discussion, where the simple no fuss no muss no plugin zero performance impact did the trick, seems like a waste.

I’m thinking it would do Freelinks, and the folk interested in it, real justice to have a Wiki-like post, instead of Freelinks info getting buried here. If folk are going to make a point of writing good stuff like you are doing, why not have a dedicated thread rather than bury Freelinks info goodies in a discussion about Customising CamelCase link detection functionality?

Not that I care. It isn’t a plugin or a discussion I’m interested in. But if I’m going to get quoted, you can safely bet that I’m going to crawl out of the woodwork and engage just because I’ve been named, even if I have zero interest in the topic.

But if you feel this is the best spot to discuss that, A-1. I’m not the boss of you or of TiddlyTalk, so have at 'er.

@Charlie_Veniot have replied to you on this matter off line, by private message.

No, it’s not. Modifying the core should never be the first stop when looking for solutions. It will be “Muss and Fuss” when the TW is shared with someone who then loses their data and complains that TW is buggy.

2 Likes