-
Notifications
You must be signed in to change notification settings - Fork 73
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
custom key mappings #17
Comments
@nikroy16 Thanks for the kind words! Unfortunately there isn't a way to create custom key mappings easily. I do want to add this in, but I can't offer an estimate when I'll get around to it. I'll happily accept a PR if anyone wants to give it a shot. If you don't mind getting your hands dirty, you can add those shortcuts to the code yourself and do a local install. For example, try adding this to https://github.com/jwkvam/jupyterlab_vim/blob/371d5625e8b034ecce0a0a14633c0229ddcead67/src/index.ts#L343
Note: I haven't tried this so I don't know if it will work. |
Thanks for creating this! I added your code snipped to
I also tried (my preferred) keybinding of
|
@jimypbr Thanks for giving it a shot. Rereading my answer, I'm afraid it was not very good :( I somehow confused myself with the different modes. I took a look at this issue lambdalisue/jupyter-vim-binding#8 Please add the last line from this snippet:
I've tested this and it works. This extension will need some way of allowing users to customize this in the future. |
@jwkvam I implemented your fix it works just like I expect. Thanks! |
Any update on defining custom mappings? |
Would be nice to be able to map even the limited number of simplest things, like ESC. What would be a reasonable way to go about it? Config file, handled by the jupyter's config system?.. |
It doesn't matter that can't use the custom key mapping except the only ESC key that should have the options,we all know to press esc can be annoying and not every computer provide the authority to |
I am using jupyter-vim-binding. It works and is very easy to custom key mappings. Maybe you can try it. |
@meteorsh does it work in the new Jupyter Lab environment or only the old Jupyter Notebooks? I got it working with jupyterlab-vim and the ex command |
Unable to get back into normal mode. @jimypbr @jwkvam I am also able to add a custom 'fd' keybinding to get into normal mode using a local install. However, when I restart the system, ( or , even when opening the same notebook in another browser(opera this time; earlier it was firefox) ) I am unable to go into the normal mode! Note that the extension is working since the remappings such as Ctr-O to create a new cell works as wxpected. Moreover, the same changes do persist in a docker image! To be clear, I created a docker image, did a local instal wrt to a running container, and then commited that contained with these changes. When I run this new container, everything works as expected. Update: I think the problem starts after reloading the notebook page. So this may happen when I open a notebook in two browsers. I am able to get back to normal mode in one of the browsers, but can't do so in another browser. |
Figured a wayaround... close all the open notebooks and refresh the webpage. Things work normally after this :) |
@jwkvam ... I was trying to map 'Shift Enter' by changing 'run-select-next-edit' to 'run-select-next-insert'. So that I land in insert mode in the new cell.(Jupyter Lab is mostly for experimentation and it makes sense to have I add these two line
The function adding the Commmand is here:
Alas, it changes nothing. Any suggestions. |
For remappings inside the editor: i.e. I'm happy to try to translate my extension into a PR for this extension if this becomes active again. |
Thanks for the great work! A vim binding was the only thing holding me back from using jupyterlab..is there a way to have custom key mappings such as jj instead of Esc? Thanks!
The text was updated successfully, but these errors were encountered: