【问题标题】:Atom Editor - How to fix: tabs are not replaced by spacesAtom 编辑器 - 如何修复:制表符不被空格替换
【发布时间】:2021-10-26 00:30:34
【问题描述】:

我最近在一台新计算机上安装了 atom 来编写一些 python 代码。当我意识到我正在使用“硬”标签编写时,我尝试将它们更改为“软”标签(4 个空格而不是一个制表符)。

在编辑器设置中,我将“自动”选项卡更改为“软”选项卡,并将空格设置为 4。之后,选项卡仍然“硬”。我看了一下config.cson文件:

"*":
  core:
    telemetryConsent: "no"
  editor:
    tabLength: 4
    tabType: "soft"

看起来不错,但软标签不起作用。我添加了以下内容:

".python.source":
  editor:
    tabLength: 4
    tabType: "soft"

但什么都没有。

有人知道这里可能发生了什么吗?

【问题讨论】:

    标签: python format atom-editor


    【解决方案1】:

    据我所知,更改此设置只会影响未来的缩进,它不应该追溯地重新缩进您的代码。但是,您可以使用选择您的代码并运行 Editor: Auto Indent 命令来实现。

    或者,有许多third-party packages 可能更适合您。

    【讨论】:

      猜你喜欢
      • 2017-06-10
      • 2011-08-14
      • 2017-05-02
      • 2014-07-15
      • 1970-01-01
      • 1970-01-01
      • 2020-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多