I am trying to optimize my ESS - R environment. So far I make use of the r-autoyas, I set intendation and stuff following style guides, in the mini-buffer there are eldoc hints for function arguments, and I have the option to press a key in order to find information about variable at point (more here).
我正在尝试优化我的ESS-R环境。到目前为止,我使用r-autoyas,我设置了意图和后续样式指南,在迷你缓冲区中有eldoc提示函数参数,我可以选择按键以查找有关变量的信息点(更多这里)。
Are there any other things you use in order to have a nice R environment? Maybe non-ESS people have some nice things to add (I got that info of variable at point from looking at an Eclipser). One example could be an easy way to insert "just-before-defined" variables without typing the variable name (should be something for that?).
你有没有其他的东西用来拥有一个漂亮的R环境?也许非ESS的人有一些很好的东西要添加(我从Eclipser那里得到了变量的信息)。一个例子可以是一种简单的方法来插入“刚才定义的”变量而不输入变量名称(应该是什么?)。
(Please help me to change the question instead of "closing" the thread if it is not well formulated)
(请帮助我改变问题而不是“关闭”线程,如果它没有很好地制定)
1 个解决方案
#1
7
I am not using autoyas as I find auto-complete integration a better approach.
我没有使用autoyas,因为我发现自动完成集成是一种更好的方法。
Insertion of previously defined symbols is a general emacs functionality called 'dabbrev-expand' and is bound to M-/. I have this in my .emacs to make it complete on full symbols:
插入先前定义的符号是称为“dabbrev-expand”的一般emacs功能,并且绑定到M- /。我在.emacs中有这个,以完整符号完成:
(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_\\|s.")
(setq dabbrev-case-fold-search t)
Another thing which I use extensively is imenu-based-jump-to-symbol-definition. It offers similar functionality to emacs tags, but just for open buffers in the same mode as the current buffer. It also uses IDO for queries:
我广泛使用的另一件事是基于imenu的跳转到符号定义。它提供与emacs标签类似的功能,但仅适用于与当前缓冲区相同模式的开放缓冲区。它还使用IDO进行查询:
Put imenu-anywhere.el
into your emacs load path and add this:
将imenu-anywhere.el放入emacs加载路径并添加:
(require 'imenu-anywhere)
(global-set-key [?\M-o] 'imenu-anywhere)
Now, if I do M-o foo RET emacs jumps to the function/class/method/generic definition of 'foo' as long as 'foo' is defined in one of the open buffers. This of course works whenever a mode defines imenu-tags. ESS defines those, so you should not need to add more.
现在,如果我做M-o foo RET emacs跳转到'foo'的函数/ class / method / generic定义,只要在其中一个开放缓冲区中定义'foo'即可。当模式定义imenu-tags时,这当然有效。 ESS定义了这些,因此您不需要添加更多内容。
There is also somewhere a collection of R-yas templates. I didn't get around to starting using them but my guess is that it's a pretty efficient template insertion mechanism.
还有一些R-yas模板的集合。我没有开始使用它们,但我的猜测是它是一个非常有效的模板插入机制。
[edit] Activate tracebug:
[编辑]激活tracebug:
(setq ess-use-tracebug t)
#1
7
I am not using autoyas as I find auto-complete integration a better approach.
我没有使用autoyas,因为我发现自动完成集成是一种更好的方法。
Insertion of previously defined symbols is a general emacs functionality called 'dabbrev-expand' and is bound to M-/. I have this in my .emacs to make it complete on full symbols:
插入先前定义的符号是称为“dabbrev-expand”的一般emacs功能,并且绑定到M- /。我在.emacs中有这个,以完整符号完成:
(setq dabbrev-abbrev-char-regexp "\\sw\\|\\s_\\|s.")
(setq dabbrev-case-fold-search t)
Another thing which I use extensively is imenu-based-jump-to-symbol-definition. It offers similar functionality to emacs tags, but just for open buffers in the same mode as the current buffer. It also uses IDO for queries:
我广泛使用的另一件事是基于imenu的跳转到符号定义。它提供与emacs标签类似的功能,但仅适用于与当前缓冲区相同模式的开放缓冲区。它还使用IDO进行查询:
Put imenu-anywhere.el
into your emacs load path and add this:
将imenu-anywhere.el放入emacs加载路径并添加:
(require 'imenu-anywhere)
(global-set-key [?\M-o] 'imenu-anywhere)
Now, if I do M-o foo RET emacs jumps to the function/class/method/generic definition of 'foo' as long as 'foo' is defined in one of the open buffers. This of course works whenever a mode defines imenu-tags. ESS defines those, so you should not need to add more.
现在,如果我做M-o foo RET emacs跳转到'foo'的函数/ class / method / generic定义,只要在其中一个开放缓冲区中定义'foo'即可。当模式定义imenu-tags时,这当然有效。 ESS定义了这些,因此您不需要添加更多内容。
There is also somewhere a collection of R-yas templates. I didn't get around to starting using them but my guess is that it's a pretty efficient template insertion mechanism.
还有一些R-yas模板的集合。我没有开始使用它们,但我的猜测是它是一个非常有效的模板插入机制。
[edit] Activate tracebug:
[编辑]激活tracebug:
(setq ess-use-tracebug t)