Closed wmayner closed 6 years ago
This currently works, but there's a ~0.5 second delay before insert mode is actually entered. I couldn't figure out how to fix that.
I suspect it has to do with CodeMirror waiting for more input, but I'm not sure.
@wmayner I forgot that the interrupt shortcut is I,I
so like vim, jupyterlab waits a while to resolve this shortcut. Raises the question if we should remap the interrupt shortcut? I never use the interrupt shortcut so I wouldn't miss it if we just unmapped it but I wouldn't be surprised if people liked it.
I prefer using Ctrl + c as the interrupt hotkey, similar to the command line. But that's a personal preference, and I'm also hesitant to remap jupyterlab defaults. It's a shame though, since i is so fundamental to using Vim.
At least if we add the command, users can remap as they see fit. Perhaps we can just add the command for now and defer the binding to a later PR?
I just realized I was actually wrong about the original functionality: in jupyter-vim-binding, i would only enter Vim command mode. So in fact your initial suggestion was totally right if the goal is to duplicate the jupyter-vim-binding functionality, and all I need to is override the default bindings in jupyterlab.
Perhaps we could use Ctrl + I as a binding to go directly into Vim insert mode, and leave it up to users to override the I + I binding if they want. Ctrl + I doesn't seem to interfere with jupyterlab bindings.
This sounds like a good compromise to me, thanks for the suggestion. I'll merge this in now. Sometime in the next few days I'll cut a new release.
This addresses #70.