[ESS] indentation of continued statements

Neil Best nbest at forestone.com
Thu Apr 12 16:26:00 CEST 2007


Hello, everyone.  I have tried to modify the behavior of ESS indentation 
to suit my style without success.  Maybe someone can point out the step 
I have missed.

For my style indenting to an open-paren is too much white space. So 
rather than:

lapply(c(1:10),
        function (x) {
          do_something()
        })

I would prefer:

lapply(c(1:10),
   function (x) {
     do_something()
   })

which would also give me the this option:

lapply(
   c(1:10),
   function (x) {
     do_something()
   })

The customization buffer indicates that setting ess-expression-offset 
and ess-arg-function-offset to a number (currently set at 0 and 2 
respectively) turns off behavior of this sort in certain situations but 
it doesn't seem to affect the base case as illustrated.  Is there some 
other variable I should look for?  Would changing to a new value of 
ess-style address this?  Thanks for your time.

Neil




More information about the ESS-help mailing list