0

I used spacemacs for my work, now I need to unbind M-1 with following, but not work

(global-unset-key (kbd "M-1")) I checked binding, it looks M-1 was used by winum-select-window-1.anyone knows how to unbind this key bind? thanks a lot

1 Answer 1

0

This keybinding is defined in the winum-keymap. You can unbind it using:

(define-key winum-keymap (kbd "M-1") nil)

global-unset-key is for removing global keybindings only, not bindings defined in specific keymaps. You can try using it after you have removed the definition from the winum-keymap (to remove its binding as a digit argument). However, there is no need to remove it, if you want, then you can just redefine it directly using global-set-key.

1
  • 1
    thanks a lot! it works
    – qbai
    Mar 20 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.