[IPython-dev] CodeMirror Vim keymaps (ipython-notebook 3.1)
David Froger
david.froger.ml at mailoo.org
Fri Apr 24 07:21:48 EDT 2015
This fix the error:
require([
'base/js/namespace',
'base/js/events',
'components/codemirror/keymap/vim'
], function(IPython, events) {
events.on('app_initialized.NotebookApp', function() {
IPython.CodeCell.options_default.cm_config["keyMap"] = "vim"
});
});
I'm now trying to understand how to switch beetween Vim modes.
Quoting David Froger (2015-04-24 13:11:58)
> Hi,
>
> I'm trying to configure ipython-notebook 3.1 (installed with miniconda) to use
> CodeMirror Vim keymaps.
>
> I put in my ~/.ipython/profile_default/static/custom/custom.js:
>
> require(['base/js/namespace', 'base/js/events'], function(IPython, events) {
> events.on('app_initialized.NotebookApp', function() {
> $.getScript('/static/components/codemirror/keymap/vim.js');
> IPython.CodeCell.options_default.cm_config["keyMap"] = "vim"
> });
> });
>
> But I got the error when openening a notebook:
>
> TypeError: next is undefined (codemirror.js:4622)
>
> What is the correct way to get CodeMirror Vim Keymaps in ipython-notebook 3.1?
>
> Thanks,
> David
>
More information about the IPython-dev
mailing list