简体   繁体   English

Emacs,ESS,R-我是怎么做到的?

[英]Emacs, ESS, R -How did i do this?

http://picasaweb.google.com/lh/photo/F-p2qK3itxJsgj1tLLGsow?feat=directlink http://picasaweb.google.com/lh/photo/F-p2qK3itxJsgj1tLLGsow?feat=directlink

If you look at the picture, theres this usage bit from the R help files at the bottom in the minbuffer. 如果您查看图片,则此使用位来自minbuffer底部的R帮助文件。

howd i do that? 我怎么做? it somehow just appeared, maybe cos i mashed the keyboard trying to run the commands. 它不知何故刚刚出现,也许是因为我捣乱了键盘试图运行命令。 It disappeared when i restarted emacs:( 当我重新启动emacs时它消失了:(

thanks 谢谢

There is a function ess-r-args-show that does this. 有一个函数ess-r-args-show可以做到这一点。

I'm not sure what the default keybindings are for it, but somehow I've ended up with this in one of my config files, which binds it to F2: 我不确定它的默认键绑定是什么,但不知怎的,我在我的一个配置文件中结束了这个,它将它绑定到F2:

;; Show function argument completion while editing R code and interacting with
;; an inferior R process
(define-key ess-mode-map [f2] 'ess-r-args-show)
(define-key ess-mode-map [f3] 'ess-r-args-insert)
(define-key inferior-ess-mode-map [f2] 'ess-r-args-show)
(define-key inferior-ess-mode-map [f3] 'ess-r-args-insert)

I believe your current *.R buffer needs to be "tied" to a running ESS/R process. 我相信你当前的*.R缓冲区需要与正在运行的ESS / R进程“绑定”。

There is an ess-eldoc package which would display the args whenever you are inside the parenthesis. 有一个ess-eldoc软件包可以在括号内显示args。 To activate put: 激活put:

(require 'ess-eldoc) 

in your emacs after you load the ess-site . 在加载ess-site后的emacs中。

[Edit]: ess-eldoc package does not exist anymore. [编辑]:ess-eldoc包不再存在。 Eldoc is activated by default in ESS. 默认情况下,ESS中会激活Eldoc。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM