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$
1

1 Answer 1

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
  • 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$ May 2, 2017 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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