0

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.

eguneys
  • 175
  • 6

1 Answers1

2

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)
jue
  • 4,576
  • 8
  • 21