Quick summary: - I got command line editing to work (thanks to all who responded to me), - but now my ``m'' key won't work in R (??!!??!!??), - and I can't find how to get command-line editing to use vi syntax. More detail: This posting consists of (1) a summary and thanks, and (2) some new questions. Summary and thanks: ================== I was having trouble getting command-line editing in R to work; I had installed R, found that ``GNU readline'' was needed, installed readline, re-installed R, and still couldn't get command line editing to work. My problem was immediately solved by Prof. Brian Ripley who said> ... you need to delete config.cache and re-configure, I expect.I did that, and away it went. I also got responses from Peter Dalgaard, Thomas Vogels, Dirk Eddelbuettel, Alex Buerkle, and Jason Turner. Thanks to all who responded. (2) New questions: ================= (a) Now my ``m'' key won't work in R!!! When I press ``m'' the machine just beeps. All other keys seem to work O.K. What's going on and how do I fix it? (The ``m'' key is only recalcitrant in R; if I quit R and go back to the Unix shell, ``m'' works fine.) (b) Thomas Vogels suggested> Once you fire up the newly built R, you can verify that the readline > library was picked up correctly using the capabilities function: > > R> capabilities("cledit") > cledit > TRUEWhen I did > capabilities("cledit") I got logical(0) The help on capabilities evinced no reference to ``cledit''. Is something missing here? (c) Thomas Vogels also asked> If you are Emacs averse, why do you use ^P instead of Esc k ? :-)[As well, Prof. Ripley pointed out that the arrow keys work --- which I wasn't sure of, so I used ^P so as to cut to the chase. I've now tried the arrow keys and they do indeed work, of course.] Well, to answer Prof. Vogels' question, I was just following the instructions in ``An Introduction to R'' by Venables and Smith, et al. They ***mention*** that command line editing can be made to work with vi syntax, but they don't say ***how***. (At least I couldn't find the ``how''; mebbe I'm just blind.) So, I now come to my QUESTION: How ***do*** you persuade the R command-line editor to use vi syntax? Ideally I would like to be able to put something into an ``init'' file (.Renviron???) so that I always get vi syntax when I fire up R. Failing that, something that I can put into a .First() function. Thanks. cheers, Rolf Turner rolf at math.unb.ca -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Rolf Turner <rolf at math.unb.ca> writes:> (a) Now my ``m'' key won't work in R!!! When I press ``m'' the machine > just beeps. All other keys seem to work O.K. What's going on and > how do I fix it? > > (The ``m'' key is only recalcitrant in R; if I quit R and go back > to the Unix shell, ``m'' works fine.)Beats me... What happens if you precede it with ^V ?> Well, to answer Prof. Vogels' question, I was just following the > instructions in ``An Introduction to R'' by Venables and Smith, et > al. They ***mention*** that command line editing can be made to work > with vi syntax, but they don't say ***how***. (At least I couldn't > find the ``how''; mebbe I'm just blind.) > > So, I now come to my QUESTION: How ***do*** you persuade the R > command-line editor to use vi syntax? Ideally I would like to be > able to put something into an ``init'' file (.Renviron???) so that > I always get vi syntax when I fire up R. Failing that, something > that I can put into a .First() function.hit ESC then Ctr-j or put the command "vi-editing-mode" in your ~/.inputrc -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
A couple of small points. On Fri, 7 Sep 2001, Rolf Turner wrote: ...> (b) Thomas Vogels suggested > > > Once you fire up the newly built R, you can verify that the readline > > library was picked up correctly using the capabilities function: > > > > R> capabilities("cledit") > > cledit > > TRUE > > When I did > > > capabilities("cledit") > > I got > > logical(0) > > The help on capabilities evinced no reference to ``cledit''. > Is something missing here?You need 1.3.1 for this.> So, I now come to my QUESTION: How ***do*** you persuade the R > command-line editor to use vi syntax? Ideally I would like to be > able to put something into an ``init'' file (.Renviron???) so that > I always get vi syntax when I fire up R. Failing that, something > that I can put into a .First() function.Try man readline: You want something like `set keymap vi-insert' in your .inputrc, I think. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._