CodeMirror 6 plugin (alpha)

If you check the demo wiki linked in my previous post, in the streams settings there is no option to select the editor for streams.

I won’t ask for codemirror support in streams if it’s not feasible and not maintainable. Atleast it should be possible to use the native Tw editor for streams in a wiki where CM6 plug in is installed.

Hello @saqimtiaz

I can expose the cursor position in the CodeMirror 6 plugin
That shouldn’t be the problem

Hi @BurningTreeC,

the tooltip pulldown is active as long as you type a alphabetic letter:
grafik

If you type another character or a space, it disappears:
grafik

→ Is this, how it works or can that be changed?

→ If not changeable, is it possible to activate this when it is triggered by ///?

Thanks, Stefan

Hi @StS ,

when you type “space” it will probably always be discarded. I was already trying out some things in that way.
But @sukima posted another regex to try in another thread and that may be better suited

I will try and see if I can change that behavior

Minimum completion length doesn’t seem to work properly, completion too frequently (it’s important to improve this), and there are too many irrelevant completions

Hello @oeyoews - yes, completion is under ongoing development

The “any word completion” pops up while typing and the minlength doesn’t work with that - I know about that problem. I will see if that can be fixed. Thank you for reporting!

Hi @StS ,

now I understand what you were asking

The pulldown should not open automatically, is that right?
I believe I can make that configurable so that it opens on ctrl-space
You can close it with escape - did you know that?

The problem with triggering the pulldown is, that different users may want to trigger it differently
I think I better go with the default behavior and add some sane configuration options

Best wishes,
Simon

Hi @BurningTreeC,

no, it is ok for me, when the polldown came.

As in my previous screenshot shown, I have a tiddler eg. stefan/codemirror-6(Style)
grafik

Typing Codemirror → the pulldown is there → it’s OK.
Typing Codemirror- → the pulldown is gone.
Same when typing a space instead of the ‘-’ (Codemirror ) → pulldown is gone.

All typing letters would be fit to an existing Tiddlername, but the pulldown diappears.

Can that be solved?

If not, can this behavior be implemented when using the trigger ///?

Thanks, Stefan

Hello @jeremyruston

The last days I was trying hard to convert the tiddlywiki parse tree to lezer trees - without success. But I learned a lot.

I’d like to ask you if it’s possible to make this editor a community project (somehow) - so that more experienced people can contribute and maybe someone more experienced than me takes over the lead of this little project

I strongly believe that this editor can become a fantastic option for many and I would give my best in helping to develop it

What do you think?
Is that a good idea and would it be possible?

Thank you and kind regards,
Simon

1 Like

Hello @StS

With version 0.0.80 I changed the regex that detects these words

Give it a try and tell me if it works better for you

1 Like

Hi @BurningTreeC,

I did a test with new version:

grafik

Typing Codemirror-6 → Pulldown still there → ok
Typing Codemirror-6/ or Codemirror → Pulldown disappears.

grafik

Hi @StS

while I can do something about the / I cannot do anything about space

Try the following for the autocompletion regex in the codemirror configuration panel:

[\w-/]*

That should work better for your titles

Hi @BurningTreeC,
this works fine now:
grafik

Thanks, Stefan

I’ve updated the plugin with a configuration option for the icon of tiddler completions.
The icon cannot be a reference to a core icon at the moment, I don’t know if that’s possible.
It works best if you enter an Emoji or a special character or something like that.


At the moment there aren’t many updates to the plugin because I’m working on the tiddlywiki language highlighting / completion.
In parts I’m having success with that but it’s not production-ready.

Best wishes,
Simon

3 Likes

Hello all,

I’d like to see how many people are using this plugin already.
Would you mind leaving me some feedback about that?


I’m about to decide what to do next and want to see if it’s worth the effort

  • creating a tiddlywiki (text/vnd.tiddlywiki) highlighter (complicated :grinning:) - and only if I find the time but tbh I’ve already gone down that rabbit hole
  • polishing the plugin (what do you think should be done in that regard?)

I’d like to make this plugin beta, by cleaning up the code base. What do you think about that? Have you encountered problems / errors?

Thank you and best wishes,
Simon

Hi Simon,
I am very happy with this plugin :slight_smile:
Now I have the ability to search, find and replace in edit mode.

Maybe 2 more things:

  • a hit display (e.g. when searching/replacing).
  • the possibility to update within TiddlyWiki

Nice work - thanks!
Greetings, Stefan

Hi @StS

I’m glad you find this plugin useful and that you’re using it!

With “hit display” you mean how many search hits there are when searching for something?
That’s something I can’t control without changing the codemirror 6 code and that would be counter productive. With an update of the codemirror 6 code it would be gone…

I haven’t created a plugin library for this, I don’t even know how to do that. But if the request is high I’ll see what I can do.

Best wishes,
Simon

ok - was just an idea :wink:

That make an update to the actual version out of the Wiki easier. :+1:

Greetings, Stefan

I am using codemirror6 plug in my wikis. The search and replace feature, highlighting of matching words are very useful features.

I have noticed a few bugs.

  1. Selection of autocompletion suggestions using keyboard - down arrows and enter key is not working. But mouse click or using trackpad for selecting tiddlers from autocompletion suggestions is working.
  2. Full-screen function not working with ? multicolumn plug in.
  3. Compatibilty issues with streams plug in. I guess streams need to drop support for CM to solve this issue.

All these can be tested in this wiki.

Hello @arunnbabu - does it work for you (using your browser and os) on the demo site?