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.
I like that. Now in ecmascript-mode (which I am using for actionscript 3), it always indents to the level of the previous parenthesis.
How can I make ecmascript-mode indent like python-mode in this respect?
Since ecmascript-mode is based on cc-mode, you can use
c-set-offsetwhich allows you to customize any syntactic symbol's offset with the preferred value.
In your case, go to the point which is indented in the wrong level, hit
C-c C-o(or type
M-x c-set-offset), accept the suggested symbol (
arglist-intro), and set it a new value (e.g.
+, the default offset).
You can also do it programmatically in your dotemacs, for instance, with: