emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
614 stars 160 forks source link

Different behaviour for ctrl-a and home at interactive prompt. #1160

Closed drgibbon closed 2 years ago

drgibbon commented 2 years ago

Hello, I love using ESS but I've noticed that when going through the command history at an interactive R prompt, home and ctrl-a do not function the same. For me (Emacs 27.2, ESS 20210818.843), ctrl-a will put the mark/cursor at the beginning of the R command (which is useful), whereas home will put the mark/cursor at the beginning of the line (which is not useful). That is, with home the cursor actually goes to the > prompt character, instead of the beginning of the R command. I guess there is a trivial fix for this?

vspinu commented 2 years ago

C-a is bound to comint-bol, home is bound to move-beginning-of-line. You can re-bind home to comint-bol if you want the same behavior

(define-key inferior-ess-mode-map (kbd "<home>") 'comint-bol)