0

There are multiple elpy keybindings that I am not using. Is there any way to unbind them? Possible bindings that I want to disable C-c C-t, C-c C-p.

I have tried following answer Globally override key binding in Emacs but it did not help.


I have also tried following, which did not work. Still does keybindings are bind to elpy.

(global-set-key (kbd "C-c C-t") nil)
(global-set-key (kbd "C-c C-p") nil)
alper
  • 1,238
  • 11
  • 30
  • 2
    Does this answer your question? [How to unbind a key?](https://emacs.stackexchange.com/questions/12383/how-to-unbind-a-key) – Marioba Feb 02 '21 at 12:59
  • I have also tried `(global-set-key (kbd "C-c C-t") nil)` but it does not work. `elpy` keeps overwritten all keybindings – alper Feb 02 '21 at 13:14

1 Answers1

2

describe-key (C-h k C-c C-t) shows that C-c C-t is defined into the elpy-mode-map, so you have to unbind the key from this map:

(define-key elpy-mode-map (kbd "C-c C-t") nil)
Marioba
  • 736
  • 4
  • 10
  • `C-c C-t` is still bind to `c → python-skeleton-class f → python-skeleton-for` etc. Is it possible to disable that too? I think that one comes from `python-mode` – alper Feb 02 '21 at 17:13
  • 1
    These are defined in the `python-mode-map` so you can unbind them with `(define-key python-mode-map (kbd "C-c C-t") nil)` – Marioba Feb 02 '21 at 17:28