How to control indentation after an open parenthesis in Emacs

前端 未结 3 2015
孤城傲影
孤城傲影 2020-12-25 13:36

When I use emacs python-mode, if the last character of a line is an open parenthesis it indents the next line just one step in from the indentation of the previous line.

3条回答
  •  甜味超标
    2020-12-25 14:33

    Thank you Török Gábor, in my case I prefered to set

    (add-hook 'XXX-mode-hook
          (lambda ()
                  (c-set-offset 'arglist-cont-nonempty '+)))
    

    I was looking for something like this :

    veryLongFunctionName (bar, bar, bar)

    For a more exhaustive list of variables : read emacs documentation

提交回复
热议问题