[ESS] is it possible to change the history keys

Charles C. Berry cberry at tajo.ucsd.edu
Fri Jan 4 22:54:04 CET 2008


On Fri, 4 Jan 2008, markleeds at verizon.net wrote:

> I just started using ESS ( thanks to Sundar and Spencer for helping me to get started ) and it's really great but I just had a question about the history keys.
>
> I have zero understanding of lisp but is it possible
> to put code in my init.el file so that my history
> keys are the up and and down arrow keys rather than
> esc p and esc n ?

Yes. You bind commands to keys (or vice versa?). Look in the FAQ - there 
is a big section on key bindings there.

Also, try

     C-h k <KEY>

where <KEY> is a key you think you did not need or wish to rebind. Like an 'arrow' key.

Some examples from my ~/.emacs


(add-hook
  'inferior-ess-mode-hook
  '(lambda()
     (define-key inferior-ess-mode-map [f3] 'ess-execute-search)
     (define-key inferior-ess-mode-map [f4] 'ess-execute-objects)
     (define-key inferior-ess-mode-map [f6] 'ess-execute)
     (define-key inferior-ess-mode-map [f8] 'comint-previous-matching-input-from-input)
     ))

(global-set-key (quote [home]) (quote beginning-of-buffer))
(global-set-key (quote [end]) (quote end-of-buffer))
(global-set-key [f29] 'scroll-down)
(global-set-key [f35] 'scroll-up)
(global-set-key [f9] 'kill-to-bol)

HTH,

Chuck

I have always had the history keys
> as the arrow keys and I'm finding it difficult to lose that habit so I 
> was hoping to trick ESS so that my brain doesn't have to be 
> reprogrammed. Thanks.
>
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901




More information about the ESS-help mailing list