Query? -- CodeMirror for text/vnd.tiddlywiki content type?

54 views
Skip to first unread message

@TiddlyTweeter

unread,
Feb 4, 2019, 7:00:26 AM2/4/19
to TiddlyWiki
I'm wondering if anyone has made a CodeMirror add-on that could highlight for the text/vnd.tiddlywiki content type.... ?

Maybe it's not possible, due to TW's parser?

Anyway I thought it work asking. Why? Because ...

When I am working on definitions, macros etc I have two problems ...

1 - I often miss simple coding errors for lack of visual feedback.

2 - You can't easily add comment lines in \define which makes reading code quite difficult.

Colouration would help a lot IMO.

Best wishes
Josiah

@TiddlyTweeter

unread,
Feb 4, 2019, 7:01:01 AM2/4/19
to TiddlyWiki
Repeat for folk on email ...

bimlas

unread,
Feb 4, 2019, 9:07:04 AM2/4/19
to TiddlyWiki
Josiah,

Not a perfect solution, but as long as somebody don't say better, change the type of tiddler to text/html while you edit it.

Mohammad

unread,
Feb 4, 2019, 9:16:47 AM2/4/19
to TiddlyWiki
Hi Josiah,
 Take a look here, may be Rob can help.




This is in my wish list.

--Mohammad

PMario

unread,
Feb 4, 2019, 9:22:41 AM2/4/19
to TiddlyWiki
Hi Josiah,

I did create a TWclassic CM highlighter. ... BUT the possibilities with TW5 are much bigger.

The new highlighter, will need to check for HTML, widgets, macros and wiki-text. So it will be a "mixed-mode" highlighter. This doesn't make it complicated, but a hell lot more work. ... (and more sophisticated ;)

At the moment there is some work going on to create a CM-rewrite see: CodeMirror 6 [1] ... which is in early alpha.

As I wrote in a different thread. I don't think, it makes much sense to create a TW5 highlighter/editor with CM5. I think, it should be done with the upcoming CM6, once they did define, how the new highlighter logic should work.

just some thoughts
Mario

@TiddlyTweeter

unread,
Feb 4, 2019, 4:47:07 PM2/4/19
to TiddlyWiki
Ciao PMario

I do see the complexity.

I am interested in ...
(a) whether it is even possible and ...
(b) ... what could be a first step towards it? 

Anything that can improve showing define and macro logic is a winner. HTML I'm less bothered about.

I wonder if we could just start on it now and add subtlety later?

I guess I find it odd we can do css and javascript but not, right now, our own "language" in CodeMirror.

Josiah
Reply all
Reply to author
Forward
0 new messages