Wednesday, August 22, 2018

Any way to swap Enter and Shift-Enter input commands in Edit-Mode, Jupyter Notebook?

Leave a Comment

I just started using ipython/jupyter notebook. The Shift-Enter (run current cell) and Enter (insert newline) commands are frustrating to use. I would like to swap the commands for those two inputs in edit-mode.

So:

Shift-Enter: (insert newline)

Enter: (run current cell)

Is there some way to remap commands for jupyter notebook? A config file maybe? It sounds like ipython notebook did not always work this way (Enter in the IPython console inserts new line instead of executing current line after kernel restart #2696). The solution to the linked github issue seems to be "just use shift-enter," and I was unable to find a solution on google.

I have the following versions:

ipykernel (4.5.2) ipython (5.3.0) jupyter (1.0.0) notebook (4.4.1) 

1 Answers

Answers 1

Open up a notebook, and under [Help] you can find [Edit Keyboard Shortcuts]. For versions before 5.0, the documentation I linked below has a detailed explanation as to what command you can run to change the shortcuts.

Source: https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Custom%20Keyboard%20Shortcuts.html

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment