26

When making separate cells in order to make separate computations to better see the result of each one before going to the next cell to do the next computation (which is a good way of doing things), it will be very useful and more efficient if the cursor would jump to the start of next input cell automatically.

This allows one to keep the hand on the ENTER key, and just hit ENTER again, without having to reach to the downarrow key to reposition the cursor to the next cell, and move the hand again to the ENTER key. This can get tiring if one has many cells to process one by one. (This is btw how Maple does it, it automatically jumps to start of next command)

Here is an example

enter image description here

Is it possible to make the notebook do this?

magma
  • 5,290
  • 24
  • 46
Nasser
  • 143,286
  • 11
  • 154
  • 359

3 Answers3

23

You can setup CellEpilog to automatically advance a cell after evaluating the current one. That way, you don't need to press the down arrow after evaluating a cell.

SetOptions[EvaluationNotebook[], 
    CellEpilog :> SelectionMove[EvaluationNotebook[], Next, Cell]]
rm -rf
  • 88,781
  • 21
  • 293
  • 472
17

If your keyboard has a numeric keypad, or a way to emulate one by using a function key, you can use Shift+Enter on the numeric keypad. This keystroke will evaluate a cell if you're in an evaluatable cell, or move to the next evaluatable cell if you're not. It would still be two keystrokes to move then evaluate, but it'd be the same keystroke.

John Fultz
  • 12,581
  • 58
  • 73
3

I don't have enough reputation to comment, but I prefer CellProlog instead of CellEpilog like in rm -rf's answer. This has the benefit of jumping to the next cell before the cell is evaluated. This avoids getting kicked out of a cell when a slow cell finishes. It does however not work on a cell if you are currently running another cell.

SetOptions[EvaluationNotebook[], CellProlog :> SelectionMove[NextCell[CellStyle -> "Input"], All, Cell]]
BoGGoG
  • 31
  • 1