Jerry Zhang
Jerry Zhang

Reputation: 1236

Emacs Python parenthesis indent

My Emacs default indent like this:

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

but I want it like this:

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

How can I do ?

I use python-mode, Emacs version: 24.4.50.1.

Thanks.

Upvotes: 1

Views: 222

Answers (1)

Andreas Röhler
Andreas Röhler

Reputation: 4804

Shipped python.el as python-mode.el set symbol major-mode likewise onto python-mode - see M-x describe-variable RET major-mode RET. From python-mode.el --it displays "Py" in modeline-- you could customize

py-closing-list-dedents-bos to t

Suffix "-bos" stands for beginning-of-statement, i.e. its indentation.

Upvotes: 0

Related Questions