六模式emacs模式,而R上 [英] vi mode to emacs mode while on R

查看:158
本文介绍了六模式emacs模式,而R上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时而R控制台上我意外地键入一个未知的键盘快捷方式,从emacs的改变编辑模式到六。

有谁知道通常这个组合键从一个更改为其他?

我在Fedora 16的机器上

我查了这个信息<一个href=\"http://stackoverflow.com/questions/2640141/is-there-a-way-to-switch-bash-or-zsh-from-emacs-mode-to-vi-mode-with-a-keystroke\">question但使用元+ V或元+ E不会改变任何东西。

更新:如下图所示工作答案击键的只有R内


解决方案

R使用键盘编辑模式GNU readline库。我思故答案是元CTRL-J 的基础上,这些链接: http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC22
<一href=\"http://www.algorithm-forge.com/techblog/2009/09/shortcuts-in-r-under-unix-from-the-readline-library/\" rel=\"nofollow\">http://www.algorithm-forge.com/techblog/2009/09/shortcuts-in-r-under-unix-from-the-readline-library/ ...

(我在MacOS 10.6运行Ubuntu 10.04 VMware下,所以我实际上是打了的Alt-FN-J 组合键来切换模式。我已经从来没有意外做到了!)

修改:由OP指出, CTRL-E 追溯到从Emacs在vi模式。 http://unixhelp.ed.ac.uk/CGI/man-cgi ?readline的+ 3 不说


 C-E的Emacs编辑模式


但是这是pretty难挖!

Sometimes while on the R console I accidentally type an unknown keyboard short cut that changes the editing mode from emacs to vi.

Does anyone know what is usually this combination of keys to change from one to the other?

I am on a Fedora 16 machine

I checked the info on this question but using meta+v or meta+e doesn't change anything.

UPDATE: The keystrokes shown the answer below work ONLY WITHIN R!

解决方案

R uses the GNU readline library for keyboard editing modes. I think the answer is therefore meta-ctrl-j, based on these links: http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC22 , http://www.algorithm-forge.com/techblog/2009/09/shortcuts-in-r-under-unix-from-the-readline-library/ ...

(I'm running Ubuntu 10.04 under VMWare on MacOS 10.6, so I actually have to hit theAlt-fn-j key combination to switch modes. I've never done it by accident!)

edit: as pointed out by the OP, Ctrl-e goes back from emacs to vi mode. http://unixhelp.ed.ac.uk/CGI/man-cgi?readline+3 does say

   "C-E"  emacs-editing-mode

but this was pretty hard to dig up!

这篇关于六模式emacs模式,而R上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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