更改Jupyter笔记本上的退格键

时间:2020-05-23 11:07:26

标签: jupyter-notebook ipython jupyter indentation

以下 https://jupyter-notebook.readthedocs.io/en/stable/frontend_config.html部分Example - Changing the notebook’s default indentation允许我将缩进从默认的4更改为3

但是,当我按下Backspace键时,这不会改变缩进。

例如如果我想编写以下代码

def multiply_bs(a,b_arr):
   out=a
   for b in b_arr :
      out*=b
   return out

如果我在写了return之后点击了out*=b,则光标位置在o的正下方,如果我点击了退格键,则光标将移至{{ 1}},它发现自己位于fo下方两行的位置。这是因为for的位置是四个空格缩进后的第一个字符。

我想禁用此功能或对其进行修复,以使其采用3空格缩进。

以下是jupyter笔记本的o部分的摘录

about

0 个答案:

没有答案
相关问题