15

I'm new to jupyter lab. In settings -> text editor key map it has a vim option which, when enabled, allows me to edit .py files with vim-style editor. However, this behavior does not carry over to .ipynb files. How can I enable this for all files edited in jupyter-lab (most importantly .ipynb)?

Internet search has revealed a plenty of vim addons for jupyter (mostly jupyter-notebook I believe), but since this behavior is already available out of the box for .py, I would assume this can be somehow configured without third-party addons. In any case, I will be grateful for information because what I find on the Internet seems to be mostly outdated/related to jupyter-notebook.

Jatentaki
  • 11,804
  • 4
  • 41
  • 37

1 Answers1

29

jupyterlab 4.x

pip install --upgrade jupyterlab-vim >= 4.0.1

jupyterlab 3.x:

pip install --upgrade jupyterlab-vim < 0.17.0

jupyterlab 2.x:

jupyter labextension install @axlair/jupyterlab_vim

jupyterlab 1.x:

jupyter labextension install jupyterlab_vim

History:

The original extension was: https://github.com/jwkvam/jupyterlab-vim

however it was never updated for jlab2.x so the community shifted to a fork: https://github.com/axelfahy/jupyterlab-vim which has subsequently moved to https://github.com/jupyterlab-contrib/jupyterlab-vim

There is also an effort to vim this into jlab core. See: https://github.com/jupyterlab/jupyterlab/issues/8592

Ianhi
  • 2,864
  • 1
  • 25
  • 24