From f2c5a359762d8f95c7da5f5b650cfa8ac123568d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 3 Sep 2015 01:00:23 -0400 Subject: Add magit-refs-toggle-tags command --- lisp/init-git.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lisp/init-git.el') diff --git a/lisp/init-git.el b/lisp/init-git.el index a219093..4c2fb23 100644 --- a/lisp/init-git.el +++ b/lisp/init-git.el @@ -487,6 +487,16 @@ prompt for REV-A." "" "NOT ") rev-b)) +(defun km/magit-refs-toggle-tags () + "Toggle showing tags in `magit-refs-mode'. +This only affects the current buffer and is useful if you do not +show tags by default." + (interactive) + (if (memq 'magit-insert-tags magit-refs-sections-hook) + (remove-hook 'magit-refs-sections-hook 'magit-insert-tags t) + (add-hook 'magit-refs-sections-hook 'magit-insert-tags t t)) + (magit-refresh-buffer)) + (define-key ctl-x-4-map "g" 'magit-find-file-other-window) (define-key km/file-map "g" 'magit-find-file) @@ -508,6 +518,8 @@ prompt for REV-A." (define-key magit-refs-mode-map "j" 'km/magit-avy-goto-subword-1) (define-key magit-cherry-mode-map "j" 'km/magit-avy-goto-subword-1) + (define-key magit-refs-mode-map (kbd "C-c C-t") 'km/magit-refs-toggle-tags) + (define-key magit-process-mode-map (kbd "C-c C-k") 'magit-process-kill) (define-prefix-command 'km/magit-map) -- cgit v1.2.3