CamelCase into Non-Camel Case?

Just a thought I had while tinkering away but, would it be possible to change the way CamelCase (technically its PascalCase, but I degressed) functions? I.e. rather than having to have a tiddler with a title matching the casing (i.e. HelloThere), could you change it so it looks for a tiddler that matches the casing and characters, but without the whitespace (and maybe if it doesn’t find matching, look for normal CamelCase?)?

So for instance, if you want to link to “Johnathan Doe Jr.”, you would type “JohnathanDoeJr.”

I feel like this would make the function of CamelCase more appealing to other users, myself included, and figured I would ask if and how this could be made?

You could introduce the features you want through a transclusion or calling a macro but that has overheads eg {{JohnathanDoeJr.||resolve}} where the resolve tiddler looks for the existence of “JohnathanDoeJr.” then “Johnathan Doe Jr.” etc… or macros <<resolve "JohnathanDoeJr.">> however you seem keen to leverage the autodetection that camel case offers.

There are two parts to this in the core;

  • Identifying the use of camel case and treating it as a link
  • Invoking the code to provide the link. Which in fact uses the $link widget
    • This does similar for other [[links]] or [[prety link|link]]

As you may see JohnathanDoeJr is camel case, one could rewrite the link widget to test if this title exist if not you may need regex to insert spaces before uppercase letters and test for the new title.

I think what you ask is possible but not sure the advantages justify the work. What if you made use of pmarios alias plugin ?

so the advantages I have in mind is just brevity, using the other two options is equal to or greater in time and concious effort to just normal wikilinks, the best thing about CamelCase IMO is the quick and simplistic implementation.

instead of shift+bracket+bracket your tiddler shift+bracket+bracket (or more if your using pipe to use an alias for the link) you just capitalize the first letter of whatever you want to reference. (and yes there are keyboard shortcuts to simplify it further but, CamelCase has the best user experience of the two, just with a less appealing outcome.)

it isnt so much about looking for different combinations so much as its to streamline the typing process when your trying to jot down a lot very quickly to not forget that spur of the moment idea, and this is especially the case on mobile where you have to really go out of your way for these special characters.

I think the uni-link plugin does not do, what’s described in the OP. It does the opposite. Uni-link alias links need brackets. eg: [[case insensitive alias|?]]

So the only advantage would be, that CTRL-SPACE will open the “alias search” popup, which will avoid to type the braces.

But that’s the same for the core SHIFT-ALT-L, which opens the “link search popup”.

1 Like

I find ctrl-L much more helpful.

SHIFT-ALT-L link search popup?, I only see it inserting [[]]

I empathise. We have had a lot of “Keyboard warriors” using tiddlywiki, everything from building there own editor toolbar buttons, with shortcut keys, autocomplete plugins, alternative editors and more have being used to enhance keyboard entry.

  • It is true however that touch devices can be hard to use in this regard. Have you tried different keyboards like a programers keyboard on your mobile? This should provide better access to shortcuts.

I like to use the editor buttons plugin that provides a save and continue editing button. This allows recent changes to be saved, and links to missing tiddlers will be generated. Perhaps we could add “missing tiddlers” to the search results of Ctrl-L in the editor. So any titles CamelCase [[or otherwise]] become available for insertion?

  • This would allow links to titles, even missing ones, will be immediatly available for insertion into the text.
  • This kind of pattern could be reused to assist you.

yes actually, I made a custom layout using heliboard, i highly recommend it, its a fantastic foss app.

That said, if its not feasible to modify the CamelCase function, then I guess I will need to get into the habit of keeping the tiddler top in view for the toolbar button.

It would be incredibly helpful if there was a plugin to add a modal in the editor that appears when you start typing a wikilink, sort of like with obsidian or vscode.

Speaking of, and I am getting off topic here so feel free to ignore this, I may just need to get into the habit of making a wiki link once per tiddler , i.e. “[[John Doe]] likes his tractor. So much so that John painted it a new shade of red this year.” rather than making ‘John’ a wikilink as well :thinking:

I just realied, I can add a ctrl key to use ctrl L, perfect! thank you both :grin:

Touch tends to like buttons, perhaps a floating button bar ? with the most importiant buttons at the front.

hm.
Honestly if we had the ability to have the editor toolbar stick to the bottom of the textarea or bottom of the display area above the mobile keyboard, sort of like the sticky title does but at the bottom of the tiddler, I think would work better than just a fpoating bar in addition to the normal editor toolbar.

also, maybe the best option is create a ctrl in the editor toolbar itself, so other mobile users can use the keyboard shortxuts :thinking: i dont think ios users can use heoiboard.

As has already being done, I envisioned the editor toolbar staying in place as the edited text scrolls behind it. However I have memories of the hammar widget, and some mobile themes that allow for floating buttons. It is worth researching before you finalise your approach.