[ESS] Configuring up and down arrow keys

tyler tyler.smith at mail.mcgill.ca
Thu Apr 9 15:21:20 CEST 2009


Steve_Friedman at nps.gov writes:

> I have just started using ESS with R.  I'm running this from a Windows
> machine via Exceed (X Terminal) to a Redhat installation of R 2.8.1
>
> I would like to know if I can configure the up / down arrow keys to work so
> that I can use them to scroll to earlier issued commands in R.
>
> If anyone can provide a suggestion I would appreciate the assistance.

Adding these lines to your .emacs might do what you want:

(defun my-ess-mode-hook ()
  (local-set-key '[up] 'comint-previous-input)
  (local-set-key '[down] 'comint-next-input))

(add-hook 'inferior-ess-mode-hook 'my-ess-mode-hook)

Cheers,

Tyler


-- 
The purpose of models is not to fit the data but to sharpen the
questions.                             --Samuel Karlin




More information about the ESS-help mailing list