CodeMirror 6 plugin (alpha)

Hi @arunnbabu, both are working for me…

Everything is working for me in the CM6 demo site. But I couldn’t find what is causing this abnormal behaviour in my wiki. That’s why I reported it.

Hi @arunnbabu81

Could you list the plugins you’re using in your wiki?
Thank you,
Simon

https://all-demo-wiki.tiddlyhost.com/#%24%3A%2FControlPanel

I see @arunnbabu81
I suspect there’s still a compatibility issue with the editor-autolist plugin
I’ll have to find out the root of the problem
I’ll report back

Yes, it’s the edit-autolist plugin that interferes with the Tab handling of this plugin
It’s not really a bug of the codemirror 6 plugin but I’ll see if I can handle this

1 Like

I’ve updated the plugin to version 0.0.87

It contains some fixes for edit-text operations that don’t pass cutStart, cutEnd, newSelStart, newSelEnd and replacement parameters. In that case codemirror 6 does nothing, just focus the editor. That means that edit-text operations that want to support codemirror 6 need to pass those parameters with their operation.

The edit-autolist plugin cannot be fully made compatible with codemirror 6 by changing the codemirror 6 plugin. It intercepts the Tab and Enter handling of codemirror 6. I will not waste time in trying to support it. It’s planned that the codemirror 6 plugin gets the features of the edit-autolist plugin by default when/if the text/vnd.tiddlywiki language is ready.

I’ve added two new configuration options and they do what their names say:

  • bracket matching
  • closing brackets

I’ve also done some cleanup of the code and some refactoring internally

That’s all,
Best wishes,
Simon

7 Likes

Thank you Simon. I closely follow your progress and CM6 made TW5 much more pleasant to work.

I tried to use this package to support vim keymap. No errors have been reported so far, but it is still the default keymap. I just briefly looked at the engin.js code and did not fully understand some of the details. This is a related commit

support vim keymap

hello @oeyoews

as I understand the instructions of this package, you need to include vim() as an extension, not as a keymap. And you need to include it BEFORE the keymaps are included.

Thanks editorExtensions.push(vim()) work

This makes reading vimrc configuration files easy

Now I definitely have reason to use cm6, the performance is very good

if vim user want to experience codemirror6 vim keymap, please click https://neotw.oeyoewl.top/

Hi @oeyoews

How can I test the vim addon on this page?

just press alt j to create new journal tiddler

palette may need further improvements for vim select mode.

1 Like

Of course, my favorite jk keymap is added

https://oeyoews.github.io/tiddlywiki-codemirror-6/

Due to the modularity of codemirror6, we can introduce it on demand and reduce the size of the package. It is now 700kb. If vimmode is added, it is 823kb(It was 1.3M before). tiddlywiki codemirror6 plugin @BurningTreeC

1 Like