[IPython-User] Swap enter and shift-enter in notebook?

Matthias Bussonnier bussonniermatthias@gmail....
Thu Aug 2 02:39:14 CDT 2012

Sorry for the brievty, answer from my phone.

If you use 0.14 dev. you can overwrite ipython file without touching the
Just add them into .ipython/profile/profile_xxx/

So just copy codecell.js,notebook.js into
.ipython/profile/profile_xxx/static/js/ and mess with it as much as you
want. It won't impact other users.
Le 2 août 2012 08:35, "Zoltán Vörös" <zvoros@gmail.com> a écrit :

> You can't customize this, it is hard-wired in
> /IPython/frontend/html/notebook/static/js/notebook.js, but if you want
> to change the keybinding, you might even have to tamper with
> codecell.js, because you have to catch enter in codemirror, I believe.
> As for Maple, it was stated many a time that the ipython frontend was
> inspired by Mathematica, and I believe, in this case it did really make
> sense: working with larger blocks of code, you would want to enter a
> newline more frequently than execute the cell.
> Cheers,
> Zoltán
> On 08/02/2012 03:51 AM, Michael McNeil Forbes wrote:
> > How would I go about swapping the behaviour of "enter" and "shift-
> > enter" in ipython notebook?  I find that my fingers are conditioned to
> > expecting "enter" to execute.  (In Maple, for example, the behaviours
> > are exactly opposite: shift-enter inserts lines and enter executes.)
> >
> > Can I customize this with a local style-sheet?  (I imagine it could be
> > done on the server, but it is probably best to keep the server
> > configuration standard so that colleagues can use the standard
> > documentation etc.)
> >
> > Thanks
> > Michael.
> > _______________________________________________
> > IPython-User mailing list
> > IPython-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-user
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120802/38833979/attachment.html 

More information about the IPython-User mailing list