Remove/replace keychord

This commit is contained in:
David Morgan 2021-12-22 12:57:21 +00:00
parent 58921d5ad9
commit 91155c30ea
2 changed files with 6 additions and 7 deletions

View File

@ -19,11 +19,16 @@
(use-package git-timemachine) (use-package git-timemachine)
(use-package magit (use-package magit
:after key-chord
:bind :bind
("C-c g" . magit-file-dispatch) ("C-c g" . magit-file-dispatch)
("C-c M-g" . magit-dispatch) ("C-c M-g" . magit-dispatch)
("C-c C-g u" . my/magit-set-upstream)
("C-c C-g r" . my/magit-refresh-state)
:config :config
;; Requires the following gitconfig:
;; [alias]
;; upstream = !git push -u origin HEAD
;; TODO - this is useful after setting push remote, but is there a better way?
(defun my/magit-set-upstream () (defun my/magit-set-upstream ()
(interactive) (interactive)
(magit-shell-command-topdir "git upstream")) (magit-shell-command-topdir "git upstream"))
@ -37,8 +42,6 @@
(file-in-directory-p (buffer-file-name buf) (magit-toplevel))) (file-in-directory-p (buffer-file-name buf) (magit-toplevel)))
(with-current-buffer buf (with-current-buffer buf
(vc-refresh-state))))) (vc-refresh-state)))))
(key-chord-define-global "UU" 'my/magit-set-upstream)
(key-chord-define-global "RR" 'my/magit-refresh-state)
:custom :custom
(magit-diff-refine-hunk 'all) (magit-diff-refine-hunk 'all)
(magit-diff-paint-whitespace-lines 'all) (magit-diff-paint-whitespace-lines 'all)

View File

@ -92,10 +92,6 @@
:diminish :diminish
:config (which-key-mode +1)) :config (which-key-mode +1))
(use-package key-chord
:config
(key-chord-mode +1))
(use-package rainbow-delimiters (use-package rainbow-delimiters
:config :config
(rainbow-delimiters-mode +1)) (rainbow-delimiters-mode +1))