jupyterlab-contrib / jupyterlab-vim

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

Add support for vim mode in Text Editor #90

Closed krassowski closed 1 year ago

krassowski commented 1 year ago

Relates to https://github.com/jupyterlab/jupyterlab/issues/14599

Code changes

User facing changes

Screenshot from 2023-07-31 19-48-14

Screenshot from 2023-07-31 19-44-53

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a Binder on branch krassowski/jupyterlab-vim/file-support

github-actions[bot] commented 1 year ago

Binder :point_left: Launch a binder notebook on branch krassowski/jupyterlab-vim/file-support

ianhi commented 1 year ago

I'm finding that whenver I enter an editor I'm entering in insert mode, rather than normal mode (which is what we do for notebooks) is it easy to enter into normal mode for consistency?

ianhi commented 1 year ago

one other weird thing, it seems that modifyEditor gets called every time I hit Esc when in a fileeditor. Probably not optimal, but also doesn't seem to be a big deal

krassowski commented 1 year ago

one other weird thing, it seems that modifyEditor gets called every time I hit Esc when in a fileeditor. Probably not optimal, but also doesn't seem to be a big deal

This is because of the shortcut in schema bound to vim:enter-normal-mode which is a workaround for search box stealing Esc (in 4.0, once 4.1 is out we should be able to drop it). It should be innocent as the heavy operations in modifyEditor are guarded.

krassowski commented 1 year ago

I'm finding that whenver I enter an editor I'm entering in insert mode, rather than normal mode (which is what we do for notebooks) is it easy to enter into normal mode for consistency?

Resolved in https://github.com/jupyterlab-contrib/jupyterlab-vim/pull/90/commits/bf589e5dfc919446acfa99c55bb453e38526cc9e

ianhi commented 1 year ago

perfect! Thank you again! I think this would have taken me days of confusion to get something like this going.

krassowski commented 1 year ago

Thank you for super quick review and releases!