Pregunta

I want the current line to be deleted when Alt, and the letter d is pressed twice.

How can I achieve this inside my Emacs configuration file?

Currently all I have is this in my .emacs:

(global-set-key (kbd "M-9") 'prev-window)
(global-set-key (kbd "M-0") 'other-window)
¿Fue útil?

Solución

You can use your own keymap:

(defvar somename-map (make-sparse-keymap) "Keymap for M-d")
(define-key somename-map (kbd "M-d") 'kill-line)
(define-key somename-map (kbd "M-w") 'kill-word)

(global-set-key (kbd "M-d") somename-map)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top