borsuk.org mrb     About     Archive     Feed

Using vim key bindings in IPython Notebook cells

The IPython Notebook, a computation environment I spend a lot of time in, uses CodeMirror for interactive editing of cells. CodeMirror supports vim key bindings (as well as emacs and sublime text) but it was not immediately obvious how to enable this for IPython Notebooks. In the profile directory for your running notebook server, simply add the following to static/custom/custom.js:

$.getScript("static/components/codemirror/keymap/vim.js")
IPython.CodeCell.options_default.cm_config["keyMap"] = "vim"
comments powered by Disqus