Ben Chuanlong Du's Blog

It is never too late to learn.

Editing JupyterLab Notebooks Using Vim

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Vim Inside Jupyter/Lab Notebooks

Firenvim

Firenvim turns your browser into a NeoVim client which means that you can use it to interact with Jupyter/Lab notebooks using NeoVim.

jupyterlab-vim

jupyterlab-vim is a JupyterLab extension which brings Vim keybindings to cells of JupyterLab notebooks. It can be installed using the following command in JupyterLab 3+.

pip3 install jupyterlab_vim

And it can be uninstalled using the following command.

pip3 uninstall jupyterlab_vim

By default, a JupyterLab extension is enabled after installtion. You can disable an extension, e.g., jupyterlab_vim, using the following command.

sudo jupyter labextension disable @axlair/jupyterlab_vim

And enable it again using the command below.

sudo jupyter labextension enable @axlair/jupyterlab_vim

Jupyter/Lab Notebooks Inside / Paired With Vim

vim-jukit

vim-jukit is a REPL plugin and Jupyter-Notebook alternative for Vim and Neovim . It is currently the best solution to edit Jupyter/Lab notebook in Vim.

jupytext.vim + iron.vim

This approach is similar to vim-jukit but its user experience is not as good as vim-jukit.

magma-nvim

magma-nvim enables you to interact with Jupyter/Lab notebooks from NeoVim.

References

Jupyter Notebook + Vim/Neovim

Comments