I followed this answer and created my minor mode to avoid my keybindings being overridden by any major modes.
So I put this in my init.el:
(define-key my-keys-mode-map (kbd "C-h") 'delete-backward-char)
(define-key my-keys-mode-map (kbd "M-h") 'backward-kill-word)
It is working with everything except when I am in helm-find-files
. While M-h
works, C-h
doesn't. If I press it twice, Help
buffer shows up saying:
^L
Major Mode Bindings Starting With C-h:
key binding
--- -------
C-h C-b helm-send-bug-report-from-helm
^L
Global Bindings Starting With C-h:
key binding
--- -------
How can I disable C-h
in helm-find-files
and keep using my own keybinding?
C-h
does nothing andC-h C-h
showsC-h C-h is undefined
– Boccaperta-IT Dec 17 '14 at 16:54(define-key helm-find-files-map (kbd "C-h") nil)
works. There is no need to use(setq help-char nil)
. Thanks for pointing me in the right direction. – Boccaperta-IT Dec 17 '14 at 17:36help-char
, you don't need it to make helm work, but you may need it for other Emacs features (such as skeletons) to work (see the question I linked to). – Constantine Dec 17 '14 at 17:46