【问题标题】:Sublime Text + Anaconda not indenting Python code correctlySublime Text + Anaconda 没有正确缩进 Python 代码
【发布时间】:2020-10-02 19:47:23
【问题描述】:

跑步:

  • 崇高文本 3.2.2
  • Python 3.8.2

Anaconda 的自动格式化功能将以下代码重新缩进如下:


    counter = 0

    def print_this():

      print("Hello World.")
      return

      def main(counter):

        if counter < 10:
          print_this()
          counter += 1
          main(counter)
        else:
          print("All done.")
          return


          main(counter)

Anaconda linting 设置需要进行哪些调整才能使重新缩进以正确格式化代码?

【问题讨论】:

  • 我无法重现这个...

标签: python-3.x sublimetext3 sublime-anaconda


【解决方案1】:

请尝试以下方法:

在顶部面板中访问View->Indentation->Tab Width: 4 space

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-05
    • 2017-11-09
    • 1970-01-01
    相关资源
    最近更新 更多