I changed my key bindings with this lines in my .init.d
:
(global-set-key "\C-i" 'previous-line)
It works normally, but when I change to markdown-mode
, key rebinds to something else, how can I disable that binding and keep this original one.
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 communityI changed my key bindings with this lines in my .init.d
:
(global-set-key "\C-i" 'previous-line)
It works normally, but when I change to markdown-mode
, key rebinds to something else, how can I disable that binding and keep this original one.
Markdown has defined the key C-i
in it's own keymap. This keymap is named markdown-mode-map
.
Markdown's mode-map has a higher priority than your global binding and therefore it shadows you global binding.
You can verify this, by pressing C-h k C-i
in markdown-mode.
If you want your global keybinding not shadowed, then you have to remove the keybinding from Markdowns's mode-map. You do that by setting the value nil
to that keybinding:
(define-key markdown-mode-map (kbd "C-i") nil)