Skip to content

Readline in vi mode on OSX

2 messages · Dave Murray-Rust, Brian Ripley

#
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.

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.

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

            
Or your assumption that it is GNU readline is causing you problems.
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: 
https://stat.ethz.ch/pipermail/r-help/2009-March/190505.html