1

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.

Jerry Zhang
  • 1,198
  • 1
  • 17
  • 36

1 Answers1

1

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.

Andreas Röhler
  • 4,804
  • 14
  • 18