CodeMirror 6 - back to development

Apparently the Autocomplete plugin can work with CodeMirror (earlier version) so perhaps this is the best route to autocomplete in code mirror?

  • I have not tested it yet but will later today

Hi @TW_Tones

I would also be eager to know if it works with CodeMirror 6 and if not what I can do to make it work :slight_smile:

Out of the box it does not work, this may be because code mirror is not using textarea

I admit I don’t know the details of how either work.

  • Including autocomplete inside input fields does not make it work.
  • Research to ensure the editor is wrapped such that the keystrokes can be monitored and the trigger can be activated, is possible the main step, and the first step at least.
  • I understand in a non-codemirror editor there is a way to trigger actions/popups inside the iframe used for the editor.

The autocomplete plugin seems to be only compatible with codemirror5 (I have not used this completion plugin). Codemirror6 has its own completion system and does not require an additional plugin.

As was raised earlier in the thread, We wanted to see if it could be adapted so the codemirror6 feature need not be developed.

1 Like

@BurningTreeC Just applied 0.5.1 – looking good!

Gotoline can provide one of the speediest ways to get back to the right location, especially after repeated saving when scrolling becomes tedious.

Ctrl+Alt+G is quite awkward.

Please make gotoline Ctrl+V.

(Ctrl+V is unused.)

Additionally the ESC key does not exit gotoline.

NOT as good:

Ctrl+G (previously suggested):

  • already used to cycle through find results.
  • already used by the browser for the same purpose

Alt+G

  • Alt keystokes are generally for app-level menus

Please don’t! Ctrl+V is system-wide clipboard Paste default shortcut in every OS and software I know.

Fred

4 Likes

I am sorry. Ctrl-V is obscenely stupid. I’m not even ashamed, because it’s so funny that my mind managed to detour that way.

Other options:

Ctrl+; / Ctrl+Shift+F / Ctrl+3 (#)

The problems with goto-line are…

  1. Remembering the line numbers :roll_eyes:
  2. They don’t work at all if line numbers are turned off. :roll_eyes: :roll_eyes:

“Bookmarks” are far more useful and easy. Basically, drop an anchor and a bookmark is created at that line. An icon appears in the gutter. F2 cycles through them all. Drop an anchor on the same line again and the bookmark is cleared.

Easy.

  1. You don’t need to remember anything. :brain:
  2. They work with and without line numbers. :100:

End of.

I have to disagree with that, but the two are by no means mutually exclusive anyway.

It’s just that Ctrl+Alt often requires two hands, or weird finger placement, depending on the keyboard.

This is clearly a highly subjective matter of use style. (I don’t know if you’re joking.)

Dropping anchors every 5 seconds sounds downright terrible to me.

I have never even heard of this. Is it a CodeMirror thing? How do you do it? I’m willing to try it, but it sounds like a lot more steps that may or may not be used.

By the way

  • How difficult/easy is it to personally customize these shortcuts? If there is any way to make this done in a Tiddler, then it would be beautiful, as we have demonstrated by our differences.