[ESS] Customizing ESS: change color background and shortcuts to evaluate line or region

Rodney Sparapani rsparapa at mcw.edu
Tue Jul 8 16:35:38 CEST 2008


Stephen Eglen wrote:
>
> 
>> And finally I added the following commands
>> to use the keys F1 and F2 to evaluate one line a region, respectively,
>> but it seems I am missing something. 
>>
>> (global-set-key [f1] 'ess-eval-line)
>> (global-set-key [f2] 'ess-eval-region)
> 
> that looks okay, what happens when you do "C-h k f1" ?  
> 
> Stephen
> 

You don't want to re-define F1 since that is a convenient short cut for 
C-h.  And, F2 is often bound to refresh within ESS so maybe that's not a 
good choice either.  In any case, I have found that the function keys 
sometimes need to be quoted (and quoting usually doesn't hurt):

(global-set-key (quote [f2]) 'ess-eval-region)




More information about the ESS-help mailing list