jupyterlab-contrib / jupyterlab-vim

Vim notebook cell bindings for JupyterLab
https://jupyterlab-contrib.github.io/jupyterlab-vim.html
MIT License
660 stars 43 forks source link

Two different "leave" transitions - One from insert to normal and another from normal to jupyter command mode. #126

Closed BAlmeidaS closed 8 months ago

BAlmeidaS commented 8 months ago

First of all, thanks a lot for working and enhancing this lib!

I would like to present a new idea to extend the commands available. Is it possible to expand the command leave-current-mode to leave-insert-mode (that I believe exists already) and leave-normal-mode?

It would be awesome if I could bind two different commands: 1 - that leaves insert mode on the cell and goes to normal mode - no matter how many times I press ESC, I will never be sent to jupyter command mode. 2 - Another one that, being on normal mode, sends me to jupyter command mode. Like Shift ESC.

BAlmeidaS commented 8 months ago

I am sorry, I just saw that you added an option to control exactly this:

image

This solved entirely my issue! You guys rock!

ianhi commented 8 months ago

@BAlmeidaS is there anything in the readme that would have helped you figure this out sooner? Happy to accept a PR improving the documentaiton

BAlmeidaS commented 8 months ago

here it is @ianhi: https://github.com/jupyterlab-contrib/jupyterlab-vim/pull/127