Is it possible to get code completion for R in Emacs ESS similar to what is available in Rstudio?

守給你的承諾、 提交于 2019-11-28 21:06:35

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(

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.

[EDIT: This is an old answer and auto-complete package dropped out of fashion since then. Please use company-mode instead. It should work by default. Wiki configuration entry is here.]

Recent versions of ESS (> v.12.02) integrate with auto-complete package out of the box (you need not configure anything, just install auto-complete). It provides help on arguments as well as function help. I added detailed instructions to the wiki

Ess-eldoc was also rewritten and from v.12.02 it's active by default, so you don't need to configure anything.

aL3xa

Or maybe we should all use search:

Emacs autocomplete-mode extension for ESS and R

I don't want to be grumpy, I found this few hours ago and I'm still shocked. It works like a charm. Though I still prefer the old-style pop-ups. =)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!