jupyter notebook 快捷键汇总

来源:互联网 发布:爱奇艺网络剧 编辑:程序博客网 时间:2024/06/02 03:12

Jupyter Notebook 有两种不同的输入模式。编辑模式下,你可以编辑代码 / text 到一个 cell 中,并有绿色的单元边框指示。命令模式下,键盘到Notebook级别的行为,并由一个带有左蓝边的灰色单元格边框指示。

命令模式

F : find and replaceCtrl-Shift-P : open the command paletteEnter : enter edit modeShift-Enter : run cell, select belowCtrl-Enter : run selected cellsAlt-Enter : run cell, insert belowY : to codeM : to markdownR : to raw1 : to heading 12 : to heading 23 : to heading 34 : to heading 45 : to heading 56 : to heading 6K : select cell aboveUp : select cell aboveDown : select cell belowJ : select cell belowShift-K : extend selected cells aboveShift-Up : extend selected cells aboveShift-Down : extend selected cells belowShift-J : extend selected cells belowA : insert cell aboveB : insert cell belowX : cut selected cellsC : copy selected cellsShift-V : paste cells aboveV : paste cells belowZ : undo cell deletionD,D : delete selected cellsShift-M : merge selected cells, or current cell with cell below if only one cell selectedCtrl-S : Save and CheckpointS : Save and CheckpointL : toggle line numbersO : toggle output of selected cellsShift-O : toggle output scrolling of selected cellsH : show keyboard shortcutsI,I : interrupt kernel0,0 : restart the kernel (with dialog)Esc : close the pagerQ : close the pagerShift-Space : scroll notebook upSpace : scroll notebook down

编辑模式

Tab : code completion or indentShift-Tab : tooltipCtrl-] : indentCtrl-[ : dedentCtrl-A : select allCtrl-Z : undoCtrl-Shift-Z : redoCtrl-Y : redoCtrl-Home : go to cell startCtrl-Up : go to cell startCtrl-End : go to cell endCtrl-Down : go to cell endCtrl-Left : go one word leftCtrl-Right : go one word rightCtrl-Backspace : delete word beforeCtrl-Delete : delete word afterCtrl-M : command modeCtrl-Shift-P : open the command paletteEsc : command modeShift-Enter : run cell, select belowCtrl-Enter : run selected cellsAlt-Enter : run cell, insert belowCtrl-Shift-Minus : split cellCtrl-S : Save and CheckpointDown : move cursor downUp : move cursor up



0 0