Created
July 6, 2013 18:36
-
-
Save minrk/5940801 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add this to <profile>/static/custom/custom.js to load vim keybindings: | |
$.getScript("/static/components/codemirror/keymap/vim.js", function() { | |
if (! IPython.Cell) return; | |
IPython.Cell.options_default.cm_config.keyMap = "vim"; | |
}); |
It definitely works with vim, though...
thanks for that !
To get out of insert mode for me CTRL - [ or COMMAND - [ on macs works
Just to confirm, it works equally well for the included emacs keybindings:
$.getScript("/static/components/codemirror/keymap/emacs.js", function() {
if (! IPython.Cell) return;
IPython.Cell.options_default.cm_config.keyMap = "emacs";
});
For a better snippet that more reliably affects all your cells, see @ivanov's vimception presentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried replacing
vim
withemacs
and it doesn't seem to work, though I'm not sure how to tell for sure.