[R] Command-line editing re-visited.

Rolf Turner rolf at math.unb.ca
Fri Sep 7 18:03:22 CEST 2001


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 
>   TRUE

When 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list