jupyter notebook快捷键

所有快捷键均来自jupyter notebook的帮助文档

The Jupyter Notebook has two different keyboard input modes. Edit mode allows you to type code or text into a cell and is indicated by a green cell border. Command mode binds the keyboard to notebook level commands and is indicated by a grey cell border with a blue left margin.

Jupyter Notebook有两种不同的键盘输入模式。编辑模式允许您在单元格中键入代码或文本,并由绿色的单元格边框指示。命令模式将键盘绑定到笔记本级别的命令,并通过带有蓝色左边框的灰色单元格边框来表示。

命令模式(按下ESC生效)

快捷键功能快捷键功能
Alt-REnter/Exit RISE SlideshowFfind and replace
Shift-I(un)set current cell as a Slide cellShift-O(un)set current cell as a Sub-slide cell
Shift-P(un)set current cell as a Fragment cellCtrl-Shift-Fopen the command palette
Ctrl-Shift-Popen the command paletteEnterenter edit mode
Popen the command paletteShift-Enterrun cell, select below
Ctrl-Enterrun selected cellsAlt-Enterrun cell and insert below
Ychange cell to codeMchange cell to markdown
Rchange cell to raw1change cell to heading 1
2change cell to heading 23change cell to heading 3
4change cell to heading 45change cell to heading 5
6change cell to heading 6Kselect cell above
Upselect cell aboveDownselect cell below
Jselect cell belowShift-Kextend selected cells above
Shift-Upextend selected cells aboveShift-Downextend selected cells below
Shift-Jextend selected cells belowAinsert cell above
Binsert cell belowXcut selected cells
Ccopy selected cellsShift-Vpaste cells above
Vpaste cells belowZundo cell deletion
D,Ddelete selected cellsShift-Mmerge selected cells, or current cell with cell below if only one cell is selected
Qclose the pagerShift-Ltoggles line numbers in all cells, and persist the setting
Shift-Spacescroll notebook upSpacescroll notebook down
快捷键功能快捷键功能
Alt-REnter/Exit RISE SlideshowF查找和替换
Shift-I(un)set current cell as a Slide cellShift-O显示或隐藏输出内容的滚动条
Shift-P(un)set current cell as a Fragment cellCtrl-Shift-Fopen the command palette
Ctrl-Shift-Popen the command paletteEnter进入编辑模式
Popen the command paletteShift-Enter运行当前块并选中下一块
Ctrl-Enter运行选定块Alt-Enter运行当前块并在下方插入新块
Y切换到codeM切换到markdown
R切换到raw1-6将当前块的第一行格式改为markdown的1-6级标题
K选择上一个块
Up选择上一个块Down选择下一个块
J选择下一个块Shift-K向上选中多个块
Shift-Up向上选中多个块Shift-Down向下选中多个块
Shift-J向下选中多个块A上方插入块
B下方插入块X剪切选定块们
C复制选定块们Shift-V向上粘贴块们
V向下粘贴块们Z撤销块删除
D,D删除选中块们Shift-M将当前块向下合并
Q/ESC关闭弹窗Shift-Ltoggles line numbers in all cells, and persist the setting
Shift-Space向上滚动Space向下滚动

编辑模式(按下Enter进入)

快捷键功能快捷键功能
Tabcode completion or indentShift-Tabtooltip
Ctrl-]indentCtrl-[dedent
Ctrl-Aselect allCtrl-Zundo
Ctrl-/commentCtrl-Ddelete whole line
Ctrl-Uundo selectionInserttoggle overwrite flag
Ctrl-Homego to cell startCtrl-Upgo to cell start
Ctrl-Endgo to cell endCtrl-Downgo to cell end
Ctrl-Leftgo one word leftCtrl-Rightgo one word right
Ctrl-Backspacedelete word beforeCtrl-Deletedelete word after
Ctrl-YredoAlt-Uredo selection
Ctrl-Menter command modeCtrl-Shift-Fopen the command palette
Ctrl-Shift-Popen the command paletteEscenter command mode
Shift-Enterrun cell, select belowCtrl-Enterrun selected cells
Alt-Enterrun cell and insert belowCtrl-Shift-Minussplit cell at cursor
Ctrl-SSave and CheckpointDownmove cursor down
Upmove cursor up
快捷键功能快捷键功能
Tab代码补全或缩进Shift-Tab工具提示或反缩进
Ctrl-]缩进Ctrl-[取消缩进
Ctrl-A全选Ctrl-Z撤销
Ctrl-/注释Ctrl-D删除整行
Ctrl-U撤销选择Inserttoggle overwrite flag
Ctrl-Home到块开头Ctrl-Up到块开头
Ctrl-End到块结尾Ctrl-Down到块结尾
Ctrl-Left向左一个词Ctrl-Right向右一个词
Ctrl-Backspace删除前一个词Ctrl-Delete删除后一个词
Ctrl-Y重复Alt-Uredo selection
Ctrl-M进入命令模式Ctrl-Shift-Fopen the command palette
Ctrl-Shift-Popen the command paletteEsc进入命令模式
Shift-Enter运行当前块,选择下一块Ctrl-Enter运行选中块
Alt-Enter运行当前块,并在下面插入一个块Ctrl-Shift-Minussplit cell at cursor
Ctrl-SSave and CheckpointDown下移光标
Up上移光标

都看到这了,给文章点个赞再走吧
   ||
   V

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值