Configure ESS environment for R

I am trying to optimize the ESS -R environment. So far I use r-autoyas , I set the intent and so on after the style guide , in the mini-buffer there are eldoc arguments for the function arguments, and I have the option to press the key to find information about variable at the point (more info here ).

Are there other things you use to have a good R environment? Perhaps non-ESS people have interesting things that I can add (I got the variable information at a point from a look at Eclipser). One example might be an easy way to insert β€œjust defined” variables without entering a variable name (should there be something for this?).

(Please help me change the question instead of "closing" the thread if it is poorly worded)

+8
r emacs environment ess
source share
1 answer

I do not use autoyas as I consider automatic integration to be the best approach.

Inserting previously defined characters is a common emacs functionality called "dabbrev-expand" and tied to M- / . I have this in my .emacs so that it fills in the complete characters:

(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_\\|s.") (setq dabbrev-case-fold-search t) 

Another thing I use widely is imenu-based-jump-to-symbol-definition . It offers similar functionality for emacs tags, but only for open buffers in the same mode as the current buffer. It also uses an IDO for queries:

imenu-anywhere screenshot

Put imenu-anywhere.el in the emacs download path and add the following:

 (require 'imenu-anywhere) (global-set-key [?\Mo] 'imenu-anywhere) 

Now, if I do Mo foo RET , emacs goes on to define the function / class / method / general concept of 'foo' if the parameter 'foo' is defined in one of the open buffers. This, of course, works when the mode defines imenu tags. ESS defines them, so you do not need to add more.

There is also a set of R-yas templates. I was not able to start using them, but I guess this is a pretty effective mechanism for inserting a template.

[edit] Activate trace:

 (setq ess-use-tracebug t) 
+7
source share

All Articles