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 ;; *** Magit
(when (fboundp 'defhydra) (when (fboundp 'defhydra)
(defhydra hydra-blame (:timeout 30.0 :exit nil) (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) ("M-w" magit-blame-copy-hash nil)
("RET" magit-show-commit nil) ("RET" magit-show-commit nil)
("c" magit-blame-cycle-style nil) ("c" magit-blame-cycle-style nil)
("q" nil nil :color blue)) ("q" nil nil :color blue)))
(global-set-key (kbd "C-x B") 'hydra-blame/body))
;; Not much to say about Magit ;; Not much to say about Magit
(use-package 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) (magit-restore-window-configuration)
(mapc #'kill-buffer buffers))) (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 (use-package blamer