[R-SIG-Mac] Readline in vi mode on OSX

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Mar 10 17:04:52 CET 2009

On Tue, 10 Mar 2009, Dave Murray-Rust wrote:

> Hi All,
> This is a slightly arcane question, but I'm wondering if anyone else uses vi 
> mode with R? On my platform, across several versions, there is some broken 
> behaviour. When executing commands like 'df)' (to delete up to the next 
> bracket) the cursor moves to the next ), but nothing is deleted. In general, 
> many delete/replace commands work only as movement.
> Has anyone else come across this, and if so, did you find a fix?
> The same commands work correctly on the command line, so I'm assuming the R 
> CLI has it's own built in version of readline, which is causing problems.

Or your assumption that it is GNU readline is causing you problems.

> I'm currently running R2.8.1 on OSX 10.5.6, but the bug has been there for 
> both R and OSX upgrades. It isn't present on Linux.

The editing library on OS X is not GNU readline.  By 'on the command 
line' I guess you mean in bash, which does include GNU readline. 
(Earlier versions of OS X did not use bash.)

If you want GNU readline, the solution it to build R to use it.  This 
is described in the R for Mac OS X FA!, section 2.1.3.

BTW, it is common policy on help lists not to answer questions about 
topics in the FAQ, and the R posting guide asked you to check that 
first. Especially when asked on the wrong list: 

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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-SIG-Mac mailing list