[ESS] how to make close-parens indent identically to close-brace?

Murat Tasan mmuurr at gmail.com
Mon Dec 8 03:53:18 CET 2014


Hi all ---

Does anyone know how to force ESS to treat closing parentheses like
closing braces when writing multi-line statements?

An example is:

## existing default indentation
list(
    a = 1:10,
    b = 10:1,
    )

But in such cases, where the open-parens is followed immediately by
whitespace/newline, I'd really like the indentation to be like braces.
I'd settle with just having the closing parens match up to the start
of the call, rather than the open-parens, though:

## treating parens a bit more like braces
list(
  a = 1:10,
  b = 10:1,
)

Has anyone ever written such a modification for ESS?
(My Elisp is nowhere near sophisticated-enough to know how to specify
this type of rule myself :-/ )

Cheers,

-murat



More information about the ESS-help mailing list