[ESS] indentation of ggplot code and ess 13.09-02

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Tue May 20 01:44:37 CEST 2014



On Mon, 19-05-2014, at 19:59, Vitalie Spinu <spinuvit at gmail.com> wrote:
>  >>> Ramon Diaz-Uriarte on Mon, 19 May 2014 17:35:45 +0200 wrote:
>
>  > Dear All,
>  > I have weird indentation problems with ggplot code but only
>  > with it[1] with the latest ESS from ELPA. For instance
>
>  > ggplot(data = dd, aes(x = x, y = y)) +
>  >     ylab("some y") +
>  >         xlab(" some x") +
>  >             fact_wrap(~z)
>
> This is not weird. It is how it is supposed to be. Continuation lines
> are now indented everywhere, no matter what. In previous versions of ESS
> indentation of continuation lines wasn't consistent.
>
> If you don't like it, set ess-first-continued-statement-offset and
> ess-continued-statement-offset in your custom indentation style.
>
> Something like this:
>      
>    (add-to-list 'ess-style-alist
>                 '(my-style
>                   (ess-indent-level . 4)
>                   (ess-first-continued-statement-offset . 2)
>                   (ess-continued-statement-offset . 0)
>                   (ess-brace-offset . -4)
>                   (ess-expression-offset . 4)
>                   (ess-else-offset . 0)
>                   (ess-close-brace-offset . 0)
>                   (ess-brace-imaginary-offset . 0)
>                   (ess-continued-brace-offset . 0)
>                   (ess-arg-function-offset . 4)
>    	          (ess-arg-function-offset-new-line . '(4))
>                 ))
>    
>    (setq ess-default-style 'my-style)


Thanks. I like that better (specially if I need to concatenate a long list
of "+" to make the final plot).

Best,

R.


>    
> As Martin mentioned, there are still some indentation issues. Please
> report here if you notice any.
>

I'll do.


R.

>    Vitalie


-- 
Ramon Diaz-Uriarte
Department of Biochemistry, Lab B-25
Facultad de Medicina 
Universidad Autónoma de Madrid 
Arzobispo Morcillo, 4
28029 Madrid
Spain

Phone: +34-91-497-2412

Email: rdiaz02 at gmail.com
       ramon.diaz at iib.uam.es

http://ligarto.org/rdiaz



More information about the ESS-help mailing list