As you may know, there are TWO implementations of the codemirror 6 plugin.
The history is that I’ve created the implementation so that it works as a tiddlywiki editor and another user forked it and extended it impressively.
The last days I’ve been working on fixing some bugs, updating the library and adding supported languages like python or rust.
Here is my codemirror 6 plugin:
And here’s its GitHub page:
I really don’t know what the upsides of the other implementation are because I’m using mine and I like it.
If me and the other developer could work together in creating ONE implementation that would probably be the best thing for the community.
BUT there could surely be a THIRD implementation
Lange Rede kurzer Sinn (long story short) - I’m back to development for this plugin and if you have bug reports and ideas, please let me know!
Perhaps we/you could name your release?, in a way that suites your design sensibility. eg “CodeMirror 6 trim”, this would at least allow us to refer to it without needing to provide a paragraph to differentiate.
As you may recall, I tried the other one… I wish I never had. It’s hard to be kind about it after the mess it made trying to uninstall it. Partly my fault for thinking it was way better than it actually was which led me to making wide changes to adopt it… and when I tried to back out (after months)… I’d forgotten “all the bits” I’d changed. Nightmare.
So, BIGGEST reason for backtracking (I reverted to CM5) was that Esc key problem in the find dialog. I failed to (re)train my fingers to reach for the mouse to cancel out of it. If I had just opened the tiddler, then immediately began with a search, and then hit escape, it closed the damn tiddler. I mention this because over in that thread, you said your code had the same problem.
2nd reason: the TW mode (syntax highlighting) is awful. Essentially, so random, I just got sick of looking at it.
Example
;this semicolon causes bold in TiddlyWiki <-- perfectly fine
;And it's bold in the other plugin <-- perfectly fine, too
But then you decide to write a semicolon mid-sentence; AND THIS IS BOLD TOO and everything after it
And some other text decided to suddenly use italics mid-paragraph. I never did find what caused it. Drove me crazy.
In my current version the escape key should always close the search panel
One problem is still open, which is the X button of the search panel not deleting a state tiddler I want it to delete…
About TW mode… that’s a BIG task!
I once tried recreating the markdown mode and see where I can go from there but it’s a really big task…
If there’s somebody with knowledge how to start, I would appreciate help!
And a big ASK, I know. But the issues with the other offering were so bad… made it unusable.
I did one way too long ago to be of any use. It was for a DSL implemented using a JSON-based lang. Even with a basic JavaScript mode as a starting point, it was a mammoth task. And, of course, not much commonality with TW.
So yes, I’m well aware of the task beset you. Hence, good luck.
I’m not saying that I’m working on tiddlywiki syntax highlighting here, to be clear.
I don’t remember, but I believe even codemirror 5 doesn’t have it.
So what’s the problem at the moment with text/vnd.tiddlywiki and codemirror 6?
Hmm. There’s a good chance I’m muddying the waters.
99.9% correct. It has things like bracket-matching done very nicely (but even that is a sub-plugin, i think).
To be clear, I wasn’t talking about your implementation, but the other one. It tries to implement both code highlighting (for TW macros et al) AND give you WYSIWYG for TW code in the editor (not just when the tiddler is rendered). So you get //weird stuff like this//‘‘and this’’. And like I said, when it breaks (often!) you get stuff appearing in italics for no reason. Weirdly, it doesn’t render like that, just appears randomly in the editor. Makes for a very “noisy” editing experience. Like I said, I got sick of looking at it.
I’ll shut up now and let you get on. When I get a time window to try yours, I grab it and let you know how it goes.
That will probably never come in my plugin … I wouldn’t know how to implement this
Another thing: The plugin probably needs an update now that the core has updated the text-editor operations. I will look into this and update the plugin accordingly.
I have updated the text-operations so that they are up-to-date with the tiddlywiki core.
I would like to gather some ideas for sensible Codemirror actions (actions triggered by typed character sequences from within the editor) that could be included in the plugin.
Do you have some input? Some ideas? Would be great
The facility to add your own is already built in.
The description is on the demo page.
Basically you create tiddlers tagged $:/tags/CodeMirror/Action and put the actions inside