[ESS] Syntax highlighting with R

Erik Iverson iverson at biostat.wisc.edu
Sat Dec 6 19:49:34 CET 2008



Graham Smith wrote:
> I suspect this is much an emacs question as an ESS question, but could
> someone help me with what I need to do to get syntax highlighting in
> ESS/R
> 
> At the moment I have this in my .emacs file
> 
> (global-font-lock-mode 1)                    ; for all buffers
> '(inferior-ess-R-font-lock-keywords)
> '(ess-R-mode-font-lock-keywords)
> '(show-paren-mode t)
> 

ESS should take care of syntax highlighting for all its supported 
languages automatically, so all I do is, in .emacs,

(load "~/src/ess-5.3.8/lisp/ess-site.el")

You'll have to adjust the path to your own of course, but after you do 
that, your .R files should have syntax highlighting if 
global-font-lock-mode is on.




More information about the ESS-help mailing list