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
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityThis 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
.