jupyterlab-contrib / jupyterlab-vim

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

Clear input state if applicable before hopping out of normal mode to jupyter command mode #82

Closed ryantam626 closed 11 months ago

ryantam626 commented 1 year ago

For example if I press d then <Esc> in normal mode (i.e. about to delete something but changed my mind), I expect to be still in normal mode instead of jupyter command mode.

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a binder notebook on branch ryantam626/jupyterlab-vim/rt.incremental-esc-fix

ianhi commented 11 months ago

@ryantam626 sorry I wasn't able to look at this when it was opened. This looks quite good and important for resolving https://github.com/jupyterlab-contrib/jupyterlab-vim/issues/73

do you have the time to rebase? if not I'm happy to take over this PR

ryantam626 commented 11 months ago

@ianhi done :raised_hands: - looks like I am not supposed to touch the changelog so I have left it alone.

ianhi commented 11 months ago

this looks correct. but just to ensure im testing it properly, how are you invoking this command? Have you modified the keyboard shortcuts to bind esc to leave-current-mode?

ianhi commented 11 months ago

ok turns out i really had to muck around with my keyboard shortcuts to get that to go. not sure why I had such trouble. but certainly seems good to me. thanks!