1

我的 Emacs 默认缩进如下:

arr = {
    'a',
    'b',
    'c',
    'd'
    }

但我想要这样:

arr = {
    'a',
    'b',
    'c',
    'd'
}

我能怎么做 ?

我使用python-mode,Emacs 版本:24.4.50.1。

谢谢。

4

1 回答 1

1

将 python.el 作为 python-mode.el 设置符号major-mode 同样发送到 python-mode - 请参阅M-x describe-variable RET major-mode RET。从 python-mode.el ——它在模式行中显示“Py”——你可以自定义

py-closing-list-dedents-bost

后缀“-bos”代表语句开头,即它的缩进。

于 2015-02-04T08:39:28.700 回答