[IPython-dev] CodeMirror Vim keymaps (ipython-notebook 3.1)
Alex Ford
fordas at uw.edu
Fri Apr 24 15:54:08 EDT 2015
I coded up a quick jupyter-compatible nbextension to support input mode
switching last week, based roughly on ivanov/ipython-vimception
<https://github.com/ivanov/ipython-vimception>. It adds a "vim" keymap and
adds a keymap selection mechanism patterned on the editor's keymap
selection system. Wasn't sure exactly how extensions should be installed &
configuration should be handled, so it may be a little rough, but it works
relatively well to quiet the vim-monkey on my back.
https://github.com/asford/notebook_input_mode
-Alex
-----
Alex Ford
Baker Group, Biomolecular Structure and Design
University of Washington
fordas at uw.edu
206.659.6559
On Fri, Apr 24, 2015 at 10:00 AM, Francisco de la Pena <
frandelapena at gmail.com> wrote:
> Unfortunately it seems that Vimception does not yet work with IPython 3.
> See https://github.com/ivanov/ipython-vimception/issues/19 .
>
> Francisco
>
> On Fri, 2015-04-24 at 09:57 -0700, Thomas Kluyver wrote:
>
> Hi David,
>
>
> You might want to look at Paul Ivanov's Vimception extension:#
> https://github.com/ivanov/ipython-vimception
>
>
> Thomas
>
>
> On 24 April 2015 at 04:21, David Froger <david.froger.ml at mailoo.org>
> wrote:
>
> 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
> >
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing listIPython-dev at scipy.orghttp://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150424/e7ffdc84/attachment.html>
More information about the IPython-dev
mailing list