I’m afraid I can’t see any vim effect with the vim plugin for code mirror. nothing seem to works.
code mirror is working, and I have other codeMirror plugins doing their stuff.
Firs off, I can’t quit the insert mode. Escape cancels the editing. I modified my keymap on the system level so that I now use the caps lock key to produce the escape char. This does not solve my problem.
I noticed the thread called “CodeMirror Keymap VimJK: supprot jk binding” but I can’t see anything I can use there. The jk trick I already saw but here I have not vim per se. I tried inserting ,{keys:"jj",type:"keyToKey",toKeys:"<Esc>",context:"insert"} in $:/plugins/tiddlywiki/codemirror/keymap/vim.js and reloaded but this doesn’t allow escaping insert mode by quickling typing jj. In fact, I wonder wether that’s vim-like insert mode or a complete failare of vim mode to launch itself…
Everything works pretty much as expected, including keystroke recording and registers. But I wish there was a way to retain the keystrokes between sessions. Also, that there was a way to insert tabs without leaving the text field, but I haven’t researched it much.
Sorry but definitely, as I click on the edit button, I am NOT in normal mode, but in insert mode or not in a vim setup to be frank. If I hit the * key, I am not making a search but plainly inserting “*” which is symptomatic.
Note also that I use a French keymap (bépo variant). So no ctr-] for me. but I was able to have a special key for escape. it is just tgat escape always make me leaving the whole edition process.
so yes! vim mode does not work for me.
If that’s important, I’m using the server mode of tw. And it’s running with podman quite nicely on my linux box.
@oeyoews YES!!! It was that, my forgetting to change the codemirror keymap to vim!
This may be because I’m not anglophon, but I find it awkward to call that parameter a “keymap”. Strictly speaking, my keymap has not changed. what has changed is the interpretation of key events. a “key input handler” would have been clearer. I would also gave thought that the default “keymap” would have been set correctly by the vim plugin.
Just tried :q! to leave without saving my changes. That command is not recognized. Is there a way it could be (a matter of config or a matter of development)?
Hum. not really handy to look for stuff there. And especially when you don’t really know how it’s called. I’m looking for ctrl-n to complete a word with what has already been typed (and if possibly use tab instead of ctrl-n) as it’s so easy.
How did you get vim to show up as a key map?
I’ve tried importing the vim keymap .js - as well as the .tid version of that - but I still just see the ‘default’ key map in CodeMirror.
And does this require CodeMirror 6?
I’ve done a bunch of searching online, but haven’t found any tutorials etc on getting the keymap to show up in that drop down.