How to improve syntax highlighting?

@poc2go Could you provide some of your stuff? I would not have thought at using TW inner js for building my own js application! I would keenly have a lok at even a simple example!

Personnally, mosts of my frustration with TW comes from typos that you can’t easily spot. I’ve not been able to use any syntax highlighting tiddly editor. I know of the plugin, but I can’t get it working. I definitely need a tutorial for that! I waste a lot of times frequently with typos. I precise thhat my coding tiddlers use a readable fix fonts for helping accuracy but the total absence of syntax colorization is really hurting.

Also what would be cool is the ability to save your tiddler without closing it. Thus, you would not lose your positions or your editing history. THAT would be very handy!

As for delimiters, what I think is missing is an escape character mechanism like in C or bash with \ like “this is a text with “double quotes” withous any problem”. This could be added to current solutions. Also, we could use backquote ` as a chain delimiter. Possibly with extra possibilities, as like it is in javascript. I would appreciate Hi, my name is <<name>> and <<catchprhase john>>. An other thing could be the use of $() like in bash. A sort of wikitext widget. Hi, my name is $(<<name>>) and $(<<catchprhase john>>) if that could help implementation. Note that it’s $() and not $()$ as currently. Surely, it could be decided to use ${} like in js to avoid the problem that this similarity would inevitably provide!

Also, $()$ is working differently witg variables from <$set> and those of <$let>. It’s OK with the first. But for the second, it can only work from macros called in the macros where the let widget is. And this is not helpful. Sometimes, I just create macros for this reason.

Back to backquote: what it would allow is also<<present \<\<name\>\>>>. A bit difficult to read but there is time when you will be find this better than not. Especially when <<present "$(name)$">> doesn’t work.

You could use the code mirror plugin (with extra plugins if applicable).
Set the tiddler field Type for coding purposes to JavaScript code application/javascript and you will get some coloring.

Extra themes here and examples here

I just don’t understand why this has not being addressed, and I think we could add to the pandoc library for conversion. Sure it may not deal with much detail in widgets but the tag open and close logic would be a start.

This already exists in the plugin Save & close / Cancel & close / Save & keep open $:/plugins/telmiger/EditButtons see Plugins — Utilities for TiddlyWiki

  • I use it in most of my wikis
1 Like

I did create this new thread with the posts above, because they better make their own thread, which may lead to a solution

Where did they go? On mobile at least I cant see where!

Sorry for the confusing wording – This is the new thread and the posts above mine are the posts that have been moved.

Off topic - but to answer.

My lastest experiment with TiddlyWiki is running at TiddlyWiki5 Ticket Search, code on GitHub @PotOfCoffee2Go/tw5-tickets with a showcase writeup on talk.tiddlywiki at tw5-ticket-search

As discussed in the showcase, my ultimate goal to to provide a web based Internet-of-Things development environment using Node-Red server-side with TiddlyWiki framework running the end user interface(s).

Will use the talk.tiddlywiki developer category for feedback as the project progresses. Hope to start the project mid next month.