[ESS] Style: avoid new lines in chains of square brackets [][]

Jeremie Juste jerem|eju@te @end|ng |rom gm@||@com
Wed Jun 2 23:37:42 CEST 2021


Hello Vincent,

On Wednesday,  2 Jun 2021 at 09:14, Vincent Arel-Bundock via ESS-help wrote:
> Hi all,
>
> Thanks for your awesome work on ESS!
>
> I use the data.table package with chains of square brackets, and would like to indent my code as follows:
>
> library(data.table)
> dat = data.table(mtcars)
> dat[
>     cyl == 4][
>   , gear := gear * 3]
>
> However, when I type this code, new lines get inserted automatically and I get this:
>
> dat[
>     cyl == 4
> ][
>     , gear := gear * 3
> ]
I cannot reproduce this behavior. Could you try with a vanilla emacs?

In the terminal

$ emacs -Q

then execute

(add-to-list 'load-path "path to ess")
(require 'ess-site)

Can you still reproduce the behavior?
If yes, could you specify which OS, emacs version and ESS version are
you currently using?

HTH,
Jeremie



More information about the ESS-help mailing list