21
$\begingroup$

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?

$\endgroup$
22
$\begingroup$

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]]
$\endgroup$
  • 3
    $\begingroup$ You beat me to it! (By only seven odd hours :o) +1 $\endgroup$ – Mr.Wizard Jul 29 '13 at 9:26
  • $\begingroup$ @rm-rf Is there any way to evaluate the next cell automatically without the need to press ENTER? $\endgroup$ – M6299 Jul 30 '13 at 9:15
  • $\begingroup$ @M6299 Why don't you do Evaluate Notebook from the menu then? $\endgroup$ – rm -rf Jul 30 '13 at 14:36
  • $\begingroup$ @rm-rf Because I want to evaluate only some of the cells and I use SelectionMove[EvaluationNotebook[], Next, Cell]] at the end of these cells. $\endgroup$ – M6299 Jul 31 '13 at 5:53
  • $\begingroup$ Is there a way to make this option 'permanent'? Currently, I have to find and evaluate that code every time I make a new notebook. $\endgroup$ – Jon Warneke Apr 19 '17 at 1:10
13
$\begingroup$

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.

$\endgroup$
  • 1
    $\begingroup$ That is the reason why I always look for notebook keyboards with an Enter key... $\endgroup$ – Yves Klett Jul 29 '13 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.