[Release] Codemirror6 Plugin

support fold by indent

4 Likes

Updated: support checkbox for markdown mode

codemirror6 1.5.1 now fixes the page freezing problem caused by empty double curly braces wireless recursion in the preview area.

New Feature: support save status

use Ctrl-s to save tiddler.

Screenity video - Feb 7, 2024

1 Like

1 Like

https://codemirror.net/docs/ref/#search.gotoLine

gotoLine: Command

Command that shows a dialog asking the user for a line number, and when a valid position is provided, moves the cursor to that line.

Supports line numbers, relative line offsets prefixed with + or -, document percentages suffixed with %, and an optional column position by adding : and a second number after the line number.

This would be an interesting thing to implement in order to quickly return to a position in the editor, particularly when using quick-saving plugin buttons like EditButtons.

Is there a good way in the git, or in the tiddler list, to enable this feature?

Also wondering if there’s material about

  • compiling/packaging the lighter (“basic” branch) git CodeMirror plugin.
  • creating custom trigger chars and lists for ide dropdowns

Thanks!

The plugin is so smooth!

I haven’t tested the usage of this function yet, but at that time, because I didn’t use it frequently and there was a shortcut key conflict, I temporarily disabled it.

1 Like

The basic branch needs to be repackaged manually, I haven’t updated it in a long time, I plan to automate the process

Update: support it already

https://codemirror.net/docs/ref/#search.gotoLine

Are there instructions on how to package the main branch?

I’m on Linux.

Thanks.

1 Like

GitHub - oeyoews/tiddlywiki-codemirror6: Next TiddlyWiki5 Next Editor Plugin: Codemirror6 Is this information useful to you?

1 Like

For new created tiddler, a minimum number of lines config is added, default value is 1


support maxheight with auto

1 Like

Oddly enough the gotoline feature is only functioning with an internet connection.

Is this because the feature is part of a module that’s not actually packaged with the plugin?

I’ve tried to find documentation on such a module, but could not find it.

Thanks for any help.

This particular gotoline feature is good for multiple reasons, including recovering after the scroll position gets lost after saving a tiddler.

Does this shortcut key not work for you?

image

I do have such a feature that I haven’t implemented yet. It’s very useful to save the last scroll/edited cursor position. But I haven’t had time to complete it recently.

The API of codemirror6 is too large. I have not yet found the relevant API to implement this function.

1 Like

Sorry, this turned out to be an issue with the LibreWolf browser.

Perhaps this could somehow be added to $:/plugins/telmiger/EditButtons rather than code mirror if the cursor position (nth character) can be found.

  • I think it reasonable if you are editing a tiddler, to save the cursor position in that tiddler but separately, perhaps in a data tiddler, tiddlername / position would be better.
  • Eventually we may even be able to edit or view a tiddler while giving a cursor position from a special link. Actually this could be done by manually setting a cursor position if nothing else.
    • May be we could save multiple cursor positions with names and intergrate a keywork search at the same time :nerd:

Recommend this minimap plugin

But I think it’s better to build a minimap that render the whole webpage.


I see, you are already using it

If I have time, I want to use js-minimap - npm to build a minimap scrollbar for Story River. Minimap 小地图插件 · tiddly-gittly/tiddlywiki-plugins · Discussion #99 · GitHub