6
$\begingroup$

Per the advice at this question about jumping to next input cell, I added the code

SetOptions[EvaluationNotebook[], 
  CellEpilog :> SelectionMove[EvaluationNotebook[], Next, Cell]
]

to my initialization block. However, this sends me to the next cell on Shift+Enter instead of the next input cell. Since the notebook is a demonstration file for class, there is a text cell between each pair of input cells. Is there a way to jump to the next input cell instead of next cell.

$\endgroup$
5
$\begingroup$

I have relatively little experience with notebook programming, so this might not be foolproof. It worked in the few situations I tried.

SetOptions[EvaluationNotebook[], 
  CellEpilog :> SelectionMove[NextCell[CellStyle -> "Input"], All, Cell]
]
$\endgroup$
  • 1
    $\begingroup$ I used this command in my initialization cells of several notebooks written by different authors, and it does exactly what I want. Thanks. $\endgroup$ – Murphy Waggoner May 2 '17 at 0:06

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.