【问题标题】:Q: Set python indent to 2 spaces in emacs 24?Q:在emacs 24中设置python缩进为2个空格?
【发布时间】:2015-11-08 09:00:59
【问题描述】:

我按照this very helpful thread 中所说的在 Emacs 23 中进行操作,但它不起作用。缩进级别保持为 4(默认)。

我在使用 Emacs 24.3 的 Mac (MacOS 10.8) 上。

【问题讨论】:

    标签: emacs python-mode


    【解决方案1】:

    结果证明解决方案相当简单。只需将其包含在您的 .emacs 文件中

    (custom-set-variables
     '(python-guess-indent nil)
     '(python-indent-offset 2))
    

    所以,那是python-indent-offset 而不是python-indent

    【讨论】:

      猜你喜欢
      • 2011-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-09
      • 1970-01-01
      • 2016-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多