dimanche 16 août 2015

shell-mode: make C-l clear the output and remove duplicate input lines

C-l usually calls recenter-top-bottom which I never use... On the other end, I often use C-l in terminals to erase/clean them.

Also shell-mode writes the input buffer twice by default. Let's fix that.
(defun my-shell-mode-hook ()
  "Set shell mode stuff"
  (setq comint-process-echoes 1)
  (local-set-key (kbd "C-l") 'erase-buffer))

(add-hook 'shell-mode-hook 'my-shell-mode-hook)

Aucun commentaire:

Enregistrer un commentaire