Reputation: 113
I would like to know how to use vi-like key bindings in a Jupyter console -- not just with ipython, but with any kernel.
Previous answers show this is possible for ipython. So, perhaps there is some flag or config file where this can be specified. Jupyter does not appear to have an equivalent to ipython profile
and giving the same flagged variables as in ipython does not work.
Upvotes: 5
Views: 982
Reputation: 113
The Jupyter console documentation almost provides the answer. For the flag, you just need to change the variable name:
jupyter console --kernel=ir --ZMQTerminalInteractiveShell.editing_mode=vi
To set this option globally, you have to add c.ZMQTerminalInteractiveShell.editing_mode='vi'
to $HOME/.jupyter/jupyter_console_config.py
. It's necessary to prefix the 'c.'
, similar to what's created when running ipython profile create
, which the documentation does not specify.
Upvotes: 10