January
January

Reputation: 17090

Tweaking the R readline behavior

The R interactive interface implements the shell-like read line behavior (I have no better words to formulate this...).

For example, pressing Ctrl-W kills the preceding word.

Now, I would like this mechanism to stop at characters other than alphanumeric. For example, if I have entered

data.frame(Ant

and press Ctrl-W, the whole string data.frame(Ant is killed. I would much prefer the Ctrl-W to kill the Ant and stop short of the left parenthesis.

Is there a way of tweaking this behavior?

Upvotes: 0

Views: 44

Answers (1)

Richie Cotton
Richie Cotton

Reputation: 121077

The behaviour of readline depends upon the operating system and the IDE. On Windows, CRTL-W doesn't delete the previous word. I don't think that there's a trivial way of changing the behaviour. At a guess, start digging around in:

http://svn.r-project.org/R/trunk/src/library/utils/src/io.c

Upvotes: 2

Related Questions