[ESS] How to get the assign-key <- via command + return?
Hofert Jan Marius
marius.hofert at math.ethz.ch
Sun Sep 11 14:20:24 CEST 2011
Dear ess-experts,
I am a new user of Aquamacs and it helps me a lot to have some "native Apple commands" available which I got used to over the last years. I was wondering how I can get ESS to accept the keystroke "Command (= Apple key) + Return" to give me the assignment arrow "<-".
I read some posts I found and tried to adapt those, but Aquamacs reports errors on startup...
I don't need/want to change the smart underscore behavior, I just want to add this additional way of putting in the assignment key "<-".
Here are things I tried:
;; define command + return as arrow in R:
(define-key osx-key-mode-map (kbd "A-<return>") 'ess-S-assign-key)
(setq ess-S-assign-key (kbd "A-<return>"))
(ess-toggle-S-assign-key t)
(ess-toggle-underscore nil)
Obviously, this does not work. I am not even sure if I address the keys correctly, I also tried <RET>, for example. For the Apple key, I am also not sure if "A" is correct (however, I found it under http://www.emacswiki.org/emacs/CustomizeAquamacs)
I tried either one of the first two lines, the second I found online, the first is similar to what I found out to define a keystroke for "eval buffer till here" (which works well and even shows up in the menus):
(define-key osx-key-mode-map (kbd "C-c C-<up>") 'ess-eval-buffer-from-beg-to-here)
Cheers,
Marius
ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland
Phone +41 44 632 2423
marius.hofert at math.ethz.ch
http://www.math.ethz.ch/~hofertj
More information about the ESS-help
mailing list