[ESS] Indentation of continued statements

Vitalie Spinu spinuvit at gmail.com
Fri Apr 25 19:52:45 CEST 2014


Unfortunately there is no way. Your example is a bit special because of
the "new-line after ( offset" which was introduced to accommodate very
long argument names. Your example should look:

   foo(a,
       b,
       c
       )

and I am not sure yet that

   foo(a,
       b,
       c
   )

is better. 

But I agree that when ( is followed by new line,

   foo(
     a,
     b,
     c
   )

is better than:

   foo(
     a,
     b,
     c
     )


I have added this to our todo list. You can also open a github issue to
be sure we don't forget about it.

  Vitalie
  
 >>> Kevin Ushey on Thu, 24 Apr 2014 23:32:34 -0700 wrote:

 > Can I also throw in my hat for 'additional customization for
 > indentation'? This is another thing I would love to see, as a new
 > Emacs + ESS user.

 > Another thing: is it possible to modify indentation so that the
 > closing parenthesis of a function call matches the function scope,
 > e.g.

 > foo(
 >   a,
 >   b,
 >   c
 > )

 > instead of

 > foo(
 >   a,
 >   b,
 >   c
 >   )

 > ? As a parallel, the c offsets give us 'arglist-close' for choosing
 > indentation for this case; do we get something similar from ESS?

 > On Thu, Apr 24, 2014 at 8:17 AM, Steve Lianoglou
 > <lianoglou.steve at gene.com> wrote:
 >> Hi,
 >> 
 >> On Thursday, April 24, 2014, Andreas Leha <
 >> andreas.leha at med.uni-goettingen.de> wrote:
 >> 
 >>> 
 >>> My use cases are often ggplots with long continuations like:
 >>> ggplot(data, aes(x=x, y=y)) +
 >>> geom_boxplot() +
 >>> facet_grid() +
 >>> xlab() +
 >>> theme()
 >> 
 >> 
 >> This is precisely where this issue bites me as well :-) however I do
 >> understand too that this isn't high priority so I just manually indent
 >> those for now ...
 >> 
 >> 
 >> 
 >> 
 >> --
 >> Steve Lianoglou
 >> Computational Biologist
 >> Genentech
 >> 
 >> [[alternative HTML version deleted]]
 >> 
 >> ______________________________________________
 >> ESS-help at r-project.org mailing list
 >> https://stat.ethz.ch/mailman/listinfo/ess-help

 > ______________________________________________
 > ESS-help at r-project.org mailing list
 > https://stat.ethz.ch/mailman/listinfo/ess-help



More information about the ESS-help mailing list