是否可以在 Emacs ESS 中获得类似于 Rstudio 中可用的代码完成的代码? [英] Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?

查看:17
本文介绍了是否可以在 Emacs ESS 中获得类似于 Rstudio 中可用的代码完成的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Rstudio 有一个很棒的代码完成功能.它提供了以给定字符串开头的函数的快速视图,以及函数和参数定义.

Rstudio has a great code completion feature. It provides a quick view of functions that start with a given string, as well as function and parameter definitions.

ESS 足够强大,对我来说很熟悉,并且集成到 Emacs 中,我在那里进行了大部分工作——所以我对搬家犹豫不决,但这个功能让我考虑搬家.

ESS is powerful enough, familiar to me, and integrated into Emacs, where I conduct most of my work - so I am hesitant to move, but this feature is making me consider such a move.

是否可以将此功能集成到 Emacs ESS 中?

Is it possible to integrate this feature into Emacs ESS?

Emacs ESS 有没有类似的东西?

Is there anything similar to this for Emacs ESS?

是否有任何希望(如果有,我如何支持这样的努力?)

Any hope that there will be (and if so, how could I support such an effort?)

推荐答案

感谢 Deepayan 的 rcompgen 包(现在作为 utils 包的一部分升级"到基础 R 中),您确实获得了完成.所以当我输入

You do get the completion thanks to the rcompgen package by Deepayan (now "promoted" into base R as part of the utils package). So when I type

lm(

然后点击 TAB 会打开一个新的缓冲区,它让我看到上面窗口的左侧:手头功能的可用选项.我不认为你可以直接显示帮助.

and hit TAB a new buffer opens which gets me the left-hand side of your window above: the available options to the function at hand. I don't think you can show the help directly though.

还有一种方法可以在打字时在迷你缓冲区中获得上下文相关的帮助,但我忘记了它是如何/在哪里打开的.

There is / was also a way to get context-sensitive help in the mini-buffer when typing but I have forgottten how/where that gets turned on.

这篇关于是否可以在 Emacs ESS 中获得类似于 Rstudio 中可用的代码完成的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆