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 the
Alt-fn-jkey combination to switch modes. I’ve never done it by accident!)edit: as pointed out by the OP,
Ctrl-egoes back from emacs to vi mode. http://unixhelp.ed.ac.uk/CGI/man-cgi?readline+3 does saybut this was pretty hard to dig up!