User interface 跳转到下一个代码单元(IPython笔记本)
我使用IPython 2.0笔记本进行教学 笔记本是在教学课之前创建的,在教学课期间按原样使用 当然,当我准备笔记本的时候,它感觉到我按顺序访问了所有的单元格(实际上,我没有) 回到课堂上,当我向学生展示概念和代码时,我不需要把焦点放在下一个单元格上,我只需要光标在下一个代码单元格中等待 我最大的希望是有人能够更改Shift-Enter的默认行为,以便它执行当前单元格,并跳转到下一个可执行单元格User interface 跳转到下一个代码单元(IPython笔记本),user-interface,customization,ipython,ipython-notebook,User Interface,Customization,Ipython,Ipython Notebook,我使用IPython 2.0笔记本进行教学 笔记本是在教学课之前创建的,在教学课期间按原样使用 当然,当我准备笔记本的时候,它感觉到我按顺序访问了所有的单元格(实际上,我没有) 回到课堂上,当我向学生展示概念和代码时,我不需要把焦点放在下一个单元格上,我只需要光标在下一个代码单元格中等待 我最大的希望是有人能够更改Shift-Enter的默认行为,以便它执行当前单元格,并跳转到下一个可执行单元格 已经完成了吗?在IPython笔记本示例中介绍了在2.x中重新定义键盘快捷键: 以下是我使用shi
已经完成了吗?在IPython笔记本示例中介绍了在2.x中重新定义键盘快捷键: 以下是我使用shift-enter键转到下一个codecell并保持编辑模式的步骤:
var add_edit_shortcuts = {
'shift-enter' : {
help : 'run cell, select next codecell',
help_index : 'bb',
handler : function (event) {
IPython.notebook.execute_cell_and_select_below();
// find next CodeCell and go into edit mode if possible, else stay in next cell
var i;
for (i = IPython.notebook.get_selected_index(); i < 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);
var添加\编辑\快捷方式={
“shift-enter”:{
帮助:“运行单元格,选择下一个codecell”,
帮助索引:“bb”,
处理程序:函数(事件){
IPython.notebook.execute_cell_和_select_below();
//找到下一个CodeCell并进入编辑模式(如果可能),否则留在下一个单元格中
var i;
对于(i=IPython.notebook.get_selected_index();i
非常有价值,谢谢!该死的“在命令模式下跳到下一个牢房”让我发疯!!我将发布一个问题以将其更改为默认设置。