user interface - Jump to next code cell (IPython notebook) -


i use ipython 2.0 notebook teaching.

the notebooks created before teaching session, , used as-is during session.

sure, when prepare notebook, has sense access cells in sequence (actually, don't).

back in class, while present concepts , code students, don't need focus put on next cell, need cursor wait in next code cell...

the best can hope has been able change default behaviour of shift-enter, executes current cell, , jump next executable cell.

has been done?

redefining keyboard shortcuts in 2.x described in ipython notebook examples:

http://nbviewer.ipython.org/github/ipython/ipython/blob/2.x/examples/notebook/user%20interface.ipynb

here use have shift-enter go next codecell , stay in edit mode:

var add_edit_shortcuts = {     'shift-enter' : {                 : 'run cell, select next codecell',                 help_index : 'bb',                 handler : function (event) {                 ipython.notebook.execute_cell_and_select_below();                 // find next codecell , go edit mode if possible, else stay in next cell                 var i;                 (i = ipython.notebook.get_selected_index(); < ipython.notebook.ncells() ;i++) {                 var cell = ipython.notebook.get_cell(i);                 if (cell instanceof ipython.codecell) {                     ipython.notebook.select(i);                     ipython.notebook.edit_mode();                     break;                 }             }             return false;         }     }, };  ipython.keyboard_manager.edit_shortcuts.add_shortcuts(add_edit_shortcuts);             

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -