Is there a mode in emacs that does syntax highlighting for the R programming language? R-mode doesn't seem to work...
Asked
Active
Viewed 2.2k times
1 Answers
84
Yes, there is: ESS.
And it is very highly recommended. And it does a lot more than just syntax highlighting so please read the docs.
Edit: Some ten+ years later, installation got easier too:
M-x package-refresh-contents ENTER
M-x package-install ENTER ess ENTER
You may want some related packages, eg poly-mode is good for markdown support, but this is a start.

Dirk Eddelbuettel
- 360,940
- 56
- 644
- 725
-
4In case you want to install it, "ess" is available on melpa's packages. `M-x package-refresh-contents ENTER`, followed by `M-x package-install ENTER ess ENTER`. As of March2019, for emacs 25.1 and newer only. – init_js Mar 15 '19 at 07:27
-
@init_js you should make that a separate answer as this should be the preferred approach asof 2019 – baibo Oct 22 '19 at 11:52
-
I get no match for ess. – Finn Årup Nielsen Jan 18 '20 at 01:02
-
@FinnÅrupNielsen There is a link in my ten+ year old answer, and the link still works. These days you also get ess at melpa and other Emacs code repos if you are into that. – Dirk Eddelbuettel Jan 18 '20 at 02:02
-
1In Ubuntu, I was able to get it to work by installing the Ubuntu/Debian package `ess`: `sudo aptitude install ess`. – Finn Årup Nielsen Jan 19 '20 at 17:14
-
1Sure. I am the maintainer of that one. `ess` is actually transitioned to `elpa-ess` just like many other Debian / Ubuntu packages for Emacs. – Dirk Eddelbuettel Jan 19 '20 at 17:20