I use C-Tab and C-Shift-Tab to navigate buffer as I would do in a browser. Unfortunately, in magit-mode (which I call using magit-status
), the key is bound to some diff expansion. The means that I can't switch buffers the ways I would like to as soon as one buffer is in magit-mode. I tried removing the binding using
(define-key magit-mode-map
(kbd "C-<Tab>") nil)
However, this does not seem to have any effect. Any ideas on how to fix this?
Edit:
Regarding my settings: I have a .emacs.d/buffers.el
which has a line defining the key binding: (global-set-key [C-tab] 'next-buffer)
.
I am using use-package
to load magit:
(use-package magit
:ensure t
:config
(define-key magit-mode-map (kbd "C-<Tab>") nil)
(with-eval-after-load 'magit-mode
(define-key magit-mode-map (kbd "<C-Tab>") nil))
(setq magit-display-buffer-function
(lambda (buffer)
(display-buffer buffer '(display-buffer-same-window)))))
I added the suggestion by Konstantin Morenko, but C-Tab
still does not work properly.