-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to remap alt key in vimrc #17
Comments
I played around with this and it's confusing that the remappings you have don't work. However, these do:
I'm not sure I totally follow the steps to reproduce this which makes it harder to debug. If you are able to come up with a minimal example demonstrating this that would be super helpful. Also does refreshing the browser page help? |
I wonder if the issue when you re-open is due to the loading order of the jupyterlab-vim extension and this extension. I'm not sure if that's controllable with explicitly depending on the other extension though. I'd prefer not to do that as that would prevent this extension from working for the people who just want vim in the fileeditor |
Hi, @ianhi About Alt Key MappingThis one worked for me perfectly. {
"inoremap":[
["<A-i>", "k"],
["<A-j>", "h"],
["<A-k>", "j"],
["<A-l>", "l"],
],
"nnoremap": [
["h", "i"],
["j", "h"],
["k", "j"],
["i", "k"],
["H", "I"],
["J", "H"],
["K", "J"],
["I", "K"],
],
} This one could not use //just change all "A" to "a"
{
"inoremap":[
["<a-i>", "k"],
["<a-j>", "h"],
["<a-k>", "j"],
["<a-l>", "l"],
],
"nnoremap": [
["h", "i"],
["j", "h"],
["k", "j"],
["i", "k"],
["H", "I"],
["J", "H"],
["K", "J"],
["I", "K"],
],
} Exit Cell Mode Cause Key Mapping DisorderI found the problem occurred immediately when I leave the cell mode by shift-G(vim extension key) or mouse click to change cell. //it has mapped in this way
// i ↑
//j k l ↓ ↑ →
// as expected?
//❎ j, k
//✅ i, l
//✅ J, K, L, H, h
//❎ I
//The I key input at the line starth, which did not change its default behavior.
//The H key input at the line starth, which is as I expected. It did not go all invalid, but partially invalid. And the invalid key mapped into vim default behavior. Suggestion
|
Alt key can not remap, how to remap it?
And I found a bug using jupyterlab 3.0.8 and vimrc 0.5.2 on WSL2 Ubuntu 20.04 Anaconda(just use pip installed, do not install the node.js).
When I reopen the Jupyterlab, all the remapping will not work. And I add comments into vimrc(otherwise can not save change), and remapping will work again, but when i use jupyterlab for a while, and it will not work again. I need add a comment the vimrc again to make it run.
Seems there is a backend process always get out of running, maybe in your or jupyterlab's code.
The text was updated successfully, but these errors were encountered: