Utoah
Utoah

Reputation: 1072

How to configure emacs to auto-indent with fixed spaces instead of align to the open parenthesis?

For example, I would like this style of indention:

int expectedIndent(int param1,
    int param2){}

instead of this style:

int currentIndent(int param1,
                  int param2){}

Thanks in advance, Utoah

Upvotes: 1

Views: 295

Answers (1)

Tao Peng
Tao Peng

Reputation: 2718

Try this:

(c-set-offset 'arglist-intro '+)
(c-set-offset 'arglist-cont-nonempty '+)
(c-set-offset 'arglist-close '+)

More details: http://cc-mode.sourceforge.net/html-manual/Paren-List-Symbols.html#Paren-List-Symbols

Upvotes: 1

Related Questions