[ESS] Highlighting of functions, variables, etc.
Sebastien Vauban
sva-news at mygooglest.com
Wed Oct 1 22:52:28 CEST 2014
Vitalie Spinu wrote:
> Ista Zahn on Wed, 1 Oct 2014 11:00:46 -0400 wrote:
>> On Wed, Oct 1, 2014 at 10:35 AM, Sebastien Vauban wrote:
>>
>>> As you can see on http://screencast.com/t/q8bodLKs, most of the
>>> symbols in the code are black-on-white.
>>>
>>> Do I miss some config to have more highlighting ("if/else",
>>> "return", differences between functions and vars, etc.) or is it the
>>> current state?
>>
>> See http://ess.r-project.org/Manual/ess.html#Highlighting and the
>> variable ess-R-font-lock-keywords
>
> There are also Font-Lock ESS and iESS sub-menues which you can use to
> select the keywords and save to your custom file.
OK, I've put this in my .emacs:
--8<---------------cut here---------------start------------->8---
(setq ess-R-font-lock-keywords
'((ess-R-fl-keyword:modifiers . t) ; default
(ess-R-fl-keyword:fun-defs . t) ; default
(ess-R-fl-keyword:keywords . t) ; default
(ess-R-fl-keyword:assign-ops . t) ; default
(ess-R-fl-keyword:constants . t) ; default
(ess-fl-keyword:fun-calls . t)
(ess-fl-keyword:numbers . t)
(ess-fl-keyword:operators . t)
(ess-fl-keyword:delimiters . t)
(ess-fl-keyword:= . t)
(ess-R-fl-keyword:F&T . t)))
(setq inferior-R-font-lock-keywords
'((ess-S-fl-keyword:prompt . t) ; default
(ess-R-fl-keyword:messages . t) ; default
(ess-R-fl-keyword:modifiers . t) ; default
(ess-R-fl-keyword:fun-defs . t) ; default
(ess-R-fl-keyword:keywords . t) ; default
(ess-R-fl-keyword:assign-ops . t) ; default
(ess-R-fl-keyword:constants . t) ; default
(ess-fl-keyword:matrix-labels . t) ; default
(ess-fl-keyword:fun-calls . t)
(ess-fl-keyword:numbers . t)
(ess-fl-keyword:operators . t)
(ess-fl-keyword:delimiters . t)
(ess-fl-keyword:= . t)
(ess-R-fl-keyword:F&T . t)))
--8<---------------cut here---------------end--------------->8---
and things are much better. Thanks.
Any reason not to put font-lock to its max by default?
Best regards,
Seb
--
Sebastien Vauban
More information about the ESS-help
mailing list