noctuid / general.el

More convenient key definitions in emacs
GNU General Public License v3.0
1k stars 44 forks source link

[Qustion] How to remap C-j in magit-revision-mode #554

Closed monkoose closed 11 months ago

monkoose commented 11 months ago

Sorry to bother not an issue, but repository doesn't have discussion section.

I have tried everything suggested, like local map with hooks, override mode etc. Nothing is working. It's like hardcoded somehow or my knowledge of emacs is just not enough to comprehend this, because everything I have tried remaped C-j in some parts of the buffer, but when point is on some diff lines C-j still calls (magit-diff-visit-worktree-file).

Any suggestions?

noctuid commented 11 months ago

Magit uses text-property maps, which have higher precedence. You'll want to unbind or rebind C-j in the relevant keymap, which is probably magit-diff-section-map in this case.