Skip to content

Instantly share code, notes, and snippets.

@jonwhittlestone
Last active July 11, 2023 13:00
Show Gist options
  • Save jonwhittlestone/f8a995608d3a6402b16c915fa4fd04f6 to your computer and use it in GitHub Desktop.
Save jonwhittlestone/f8a995608d3a6402b16c915fa4fd04f6 to your computer and use it in GitHub Desktop.
VIM bindings in Jupyter notebook (Django shell_plus)
See: https://github.com/lambdalisue/jupyter-vim-binding/wiki/Installation
1. pip install jupyter_contrib_nbextensions
2. jupyter nbextensions_configurator enable --use
3. Add the vim binding
# You may need the following to create the directoy
mkdir -p $(jupyter --data-dir)/nbextensions
# Now clone the repository
cd $(jupyter --data-dir)/nbextensions
git clone https://github.com/lambdalisue/jupyter-vim-binding vim_binding
chmod -R go-w vim_binding
4. Start notebook server and *Enable* the extension
`$ jupyter notebook`
http://localhost:8888/nbextensions?nbextension=vim_binding/vim_binding
5. Go to your notebook and start using VIM bindings in cells
http://localhost:8888/notebooks/onboarding_models.ipynb
6. (optional) For vim bindings in jupyter lab:
https://github.com/jwkvam/jupyterlab-vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment