[ESS] Change C-x h to C-a

Vitalie Spinu spinuvit.list at gmail.com
Thu Oct 6 13:20:43 CEST 2011

Hi Antonio,

Personally I believe it's not a very good idea to remap this action.
It's better to keep the basic navigation shortcuts handy, as they are
by default (unless you have 10cm pinkie to stretch to Home key). With
emacs \C-a is one of the most often used actions, in contrast to \C-x
h which is of occasional use only.

I tried your shortcuts, they both work. And you don't need to put them
in the hook. Just place

(define-key comint-mode-map [(control ?a)] 'mark-whole-buffer)

after ess initialization part.


On Wed, Oct 5, 2011 at 5:01 PM, Polaf <polaf at gmx.com> wrote:
> Hello,
>  I am trying to change C-x h to C-a .
>  With (global-set-key [(control a)] 'mark-whole-buffer) I was patly succesfull.
>  In fact the shortcut does not work in ESS R buffer.
>  I tryed also:
>  ;Binding in R console
>  (add-hook 'comint-mode-hook
>  (lambda ()
>  (define-key comint-mode-map [(control a)] 'mark-whole-buffer)
>  ))
>  (add-hook 'inferior-ess-mode-hook
>  '(lambda nil
>  (define-key inferior-ess-mode-map [(control a)] 'mark-whole-buffer)
>  ))
>  Without success.
>  Thanks for help
>  Antonio
>        [[alternative HTML version deleted]]
> ______________________________________________
> ESS-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help

More information about the ESS-help mailing list