Extend backend-agnostic vc functionality

this commit adds a default keybinding for the vc-gutter hydra (leader-g
.) if both vc-gutter and hydra are enabled. It ensures that the various
vc-*-log-view-modes open up in emacs state, and it adds hg, svn and bzr
to the list of vc backends handled by git-gutter
This commit is contained in:
Sebastian Sturm 2020-02-29 13:55:45 +01:00
parent ac87afe34b
commit 2ce58c6df3
4 changed files with 31 additions and 8 deletions

View file

@ -23,5 +23,12 @@
("m" git-gutter:mark-hunk)
("p" git-gutter:popup-hunk)
("R" git-gutter:set-start-revision)
("q" nil :color blue)
("Q" (git-gutter-mode -1) :color blue))
("q"
(when (get-buffer git-gutter:popup-buffer)
(kill-buffer (get-buffer git-gutter:popup-buffer)))
:color blue)
("Q"
(progn (git-gutter-mode -1)
(when (get-buffer git-gutter:popup-buffer)
(kill-buffer (get-buffer git-gutter:popup-buffer))))
:color blue))

View file

@ -51,6 +51,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
(git-gutter-mode +1)
(remove-hook 'after-save-hook #'+vc-gutter-init-maybe-h 'local)))))))
(setq git-gutter:handled-backends '(git hg svn bzr))
;; Disable in Org mode, as per
;; <https://github.com/syl20bnr/spacemacs/issues/10555> and
;; <https://github.com/syohex/emacs-git-gutter/issues/24>. Apparently, the