Jatentaki
Jatentaki

Reputation: 13103

How to enable VIM mode for editing notebooks in jupyter-lab?

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.

Upvotes: 19

Views: 21090

Answers (1)

Ianhi
Ianhi

Reputation: 3152

jupyterlab 4.x

pip install --upgrade jupyterlab-vim >= 4.0.1

4.1.1 is the last version to support jupyterlab < 4.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

Upvotes: 37

Related Questions