c-x B calls magit-blame directly

This commit is contained in:
2026-08-21 23:16:15 +02:00
parent cfb9e1dae8
commit d81c8c919a

View File

@@ -1,6 +1,5 @@
;; *** Magit
(when (fboundp 'defhydra)
(defhydra hydra-blame (:timeout 30.0 :exit nil)
"
@@ -24,9 +23,7 @@ Reach this hydra with <C-x B>, magit-blame mode must be active
("M-w" magit-blame-copy-hash nil)
("RET" magit-show-commit nil)
("c" magit-blame-cycle-style nil)
("q" nil nil :color blue))
(global-set-key (kbd "C-x B") 'hydra-blame/body))
("q" nil nil :color blue)))
;; Not much to say about Magit
(use-package magit
@@ -158,7 +155,17 @@ Reach this hydra with <C-x B>, magit-blame mode must be active
(magit-restore-window-configuration)
(mapc #'kill-buffer buffers)))
(define-key magit-status-mode-map (kbd "q") #'tvd-kill-magit-buffers))
(define-key magit-status-mode-map (kbd "q") #'tvd-kill-magit-buffers)
(defun tvd-blame-mode()
(interactive)
(if (not magit-blame-mode)
(progn
(magit-blame)
(hydra-blame/body))))
(global-set-key (kbd "C-x B") 'tvd-blame-mode)
)
(use-package blamer