[IPython-dev] Emacs/Vim keybindings in the notebook

Fernando Perez fperez.net@gmail....
Thu Jan 26 01:35:45 CST 2012


Hi all,

here's a branch:

https://github.com/fperez/ipython/tree/cm-keymaps

for some enterprising user who wants to add support for the new
emacs/vim keybinding modes in the notebook.  The reason I'm not making
a PR out of it is that it would require client-side configuration, so
that users can choose which keymap to use (or none at all, which is
the default today and leaves the text area to be managed by the
browser bindings-wise).  Since the problem of client-side
configuration isn't trivial and I don't have time to work on it right
now, this can't really be merged.

In the meantime, anyone who wants to keep this in their local tree can
just pull this branch in, right now it's set for emacs mode, but you
just need to replace 'emacs' with 'vim' in two places:

https://github.com/fperez/ipython/commit/b5a09444a8e6963d6fbde9db168d0c37e6949cc3

to get vim keybindings.

The emacs bindings are pretty limited, with lots of imoprtant ones
missing.  But the vim.js file looks a lot larger, so it may be that
one is more solid.  You can play with the bindings in the CodeMirror
demos right away without having to patch IPython:

http://codemirror.net/demo/emacs.html
http://codemirror.net/demo/vim.html

My real hope with this is that someone will want this bad enough that
they'll do the work of building the config system to get there.  Think
of this branch as a fishing hook, I'm just hoping it will go deep
enough into someone's belly to reel them all the way into a config
system ;)

Cheers,

f


More information about the IPython-dev mailing list