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
Apparently the Autocomplete plugin can work with CodeMirror (earlier version) so perhaps this is the best route to autocomplete in code mirror?
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
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.
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.
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):
Alt+G
Alt
keystokes are generally for app-level menusPlease don’t! Ctrl+V
is system-wide clipboard Paste default shortcut in every OS and software I know.
Fred
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…
“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.
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
Meanwhile in Southtyrol …
@BurningTreeC has updated the plugin to v0.6.3
There are some bugfixes included and the updated library and (yes I know, it’s VERY opinionated) the styles for the editor toolbar buttons (I will think about those)
Now I’d like to address configurable keyboard shortcuts if possible
Hi all,
CodeMirror 6 v0.7.0 is online and includes a new Keyboard Shortcut system.
It allows changing the CodeMirror KeyMap by creating Tiddlers with the tag $:/tags/KeyboardShortcut/CodeMirror
.
It’s based on the Tiddlywiki Core system but doesn’t use event.keyCode
to get the key that’s being pressed - but uses event.key
… this sadly ditches Internet Explorer support
But the upside is, that we can use the Keyboard Shortcuts easily for CodeMirror, too, without having to convert them from TiddlyWiki format to CodeMirror format in a complicated manner.
This Keyboard Shortcut system needs testing. KB shortcuts should still work the same way, KB shortcut names shouldn’t change. If they do, I need to update an internal conversion-table. Currently this table is short, I’m sure I need to add some entries. It looks like this:
var conversionKeys = {
"ArrowLeft": "Left",
"ArrowRight": "Right",
"ArrowUp": "Up",
"ArrowDown": "Down",
",": "Comma",
";": "Semicolon",
".": "Period",
":": "Colon"
};
I’m not experienced in which other characters need conversion, we’ll find out.
Please let me know if there are issues that arise from this change. It’s pretty experimental still.
Thank you,
Simon
… aaand v0.7.2 is soon online which should fix the CodeMirror Keyboard Shortcuts not being recognized if they contain a “character” from the conversionKeys
no doesn’t work yet!
But now it works
Version 0.7.4
Tested
Too bad that we cannot change keyboard shortcuts on-the-fly but need to close and open the Tiddler if we change one. Would be very cool otherwise
Version 0.7.5 is out!
If you want to test, the plugin is online.
But beware, this might be in a very buggy state
Yes, but manageable.
@discourse
I really, really don’t care.
Version 0.7.7 fixes the escape-key-handling within the editor and fixes the broken editor-preview
Now that I’ve figured out how to change configurations on the fly I may implement more interesting features.