Show More
@@ -114,6 +114,14 b' var IPython = (function (IPython) {' | |||
|
114 | 114 | } else if (event.which === key.ENTER && event.shiftKey) { |
|
115 | 115 | that.execute_selected_cell(); |
|
116 | 116 | return false; |
|
117 | } else if (event.which === key.ENTER && event.altKey) { | |
|
118 | // Execute code cell, and insert new in place | |
|
119 | that.execute_selected_cell(); | |
|
120 | // Only insert a new cell, if we ended up in an already populated cell | |
|
121 | if (/\S/.test(that.get_selected_cell().get_text()) == true) { | |
|
122 | that.insert_cell_above('code'); | |
|
123 | } | |
|
124 | return false; | |
|
117 | 125 | } else if (event.which === key.ENTER && event.ctrlKey) { |
|
118 | 126 | that.execute_selected_cell({terminal:true}); |
|
119 | 127 | return false; |
@@ -28,6 +28,7 b' var IPython = (function (IPython) {' | |||
|
28 | 28 | var shortcuts = [ |
|
29 | 29 | {key: 'Shift-Enter', help: 'run cell'}, |
|
30 | 30 | {key: 'Ctrl-Enter', help: 'run cell in-place'}, |
|
31 | {key: 'Alt-Enter', help: 'run cell, insert below'}, | |
|
31 | 32 | {key: 'Ctrl-m x', help: 'cut cell'}, |
|
32 | 33 | {key: 'Ctrl-m c', help: 'copy cell'}, |
|
33 | 34 | {key: 'Ctrl-m v', help: 'paste cell'}, |
@@ -253,12 +253,19 b' the notebook can be achieved with minimal mouse intervention. The main' | |||
|
253 | 253 | key bindings you need to remember are: |
|
254 | 254 | |
|
255 | 255 | * :kbd:`Shift-Enter`: execute the current cell (similar to the Qt console), |
|
256 |
show output (if any) and |
|
|
257 | simply using :kbd:`Enter` *never* forces execution, it simply inserts a new | |
|
258 | line in the current cell. Therefore, in the notebook you must always use | |
|
259 | :kbd:`Shift-Enter` to get execution (or use the mouse and click on the ``Run | |
|
260 | Selected`` button). | |
|
261 | ||
|
256 | show output (if any) and jump to the next cell below. If :kbd:`Shift-Enter` | |
|
257 | was invoked on the last input line, a new code cell will also be created. Note | |
|
258 | that in the notebook, simply using :kbd:`Enter` *never* forces execution, | |
|
259 | it simply inserts a new line in the current cell. Therefore, in the notebook | |
|
260 | you must always use :kbd:`Shift-Enter` to get execution (or use the mouse and | |
|
261 | click on the ``Run Selected`` button). | |
|
262 | ||
|
263 | * :kbd:`Alt-Enter`: this combination is similar to the previous one, with the | |
|
264 | exception that, if the next cell below is not empty, a new code cell will be | |
|
265 | added to the notebook, even if the cell execution happens not in the last cell. | |
|
266 | In this regard, :kbd:`Alt-Enter`: is simply a shortcut for the :kbd:`Shift-Enter`, | |
|
267 | :kbd:`Ctrl-m a` sequence. | |
|
268 | ||
|
262 | 269 | * :kbd:`Ctrl-Enter`: execute the current cell in "terminal mode", where any |
|
263 | 270 | output is shown but the cursor stays in the current cell, whose input |
|
264 | 271 | area is flushed empty. This is convenient to do quick in-place experiments |
General Comments 0
You need to be logged in to leave comments.
Login now