[R] Indentation in R code
Seth Falcon
sfalcon at fhcrc.org
Sun Sep 25 19:19:02 CEST 2005
On 24 Sep 2005, goran.brostrom at gmail.com wrote:
> I am using emacs-21.3 when writing R functions on Linux debian, and
> I am trying to follow the advice i R-exts.pdf (2.1.1) regarding
> indentation. That is, I set 'c-default-style' to "bsd" and
> 'c-basic-offset' to 4. However, while this gives me the intended
> indentation in C code, it doesn't change the behavior in R code; I
> still get an indentation of size 2. This is my .emacs file after
> customization:
>
> (require 'ess-site)
> (custom-set-variables
> ;; custom-set-variables was added by Custom -- don't edit or
> ;; cut/paste it! Your init file should contain only one such
> ;; instance.
> '(c-basic-offset 4)
> '(c-default-style "bsd"))
> (custom-set-faces
> ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
> ;; Your init file should contain only one such instance.
> )
Not sure if this is the best way, but I have the following after
loading ess-site:
(setq ess-indent-level 4)
+ seth
More information about the R-help
mailing list