Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Add forge at @
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
justbur committed Feb 16, 2019
1 parent cb5b354 commit 1c6fbb3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ commits to master. Any help is welcomed.

* Recent Changes (most recent first)

1. [2019-02-15] Added =forge-dispatch= at =@=.
1. [2018-05-22] Added =evil-magit-use-z-for-folds=. See docstring for more
information.
2. [2018-03-13] Added basic evil support for =magit-list-repositories=.
Expand Down Expand Up @@ -137,6 +138,7 @@ tables. Blank columns indicate that the key is carried over from the left.
| stash | =z/Z= | | | | =Z= |
| git-cmd | =:= | =¦= | | | |
| run | =!= | | | | |
| forge | =@= | | | | |
| diff less/more context | =-/+= | = / + | | | |
| copy section info | =C-w= | | =ys= | | |
| copy buffer info | =M-w= | | =yb= | | |
Expand Down
19 changes: 7 additions & 12 deletions evil-magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ moment.")
(,states magit-mode-map "'" magit-submodule "o")
(,states magit-mode-map "\"" magit-subtree "O")
(,states magit-mode-map "=" magit-diff-less-context "-")
(,states magit-mode-map "@" forge-dispatch)
(,states magit-mode-map "j" evil-next-visual-line)
(,states magit-mode-map "k" evil-previous-visual-line)
(,states magit-mode-map "gg" evil-goto-first-line)
Expand Down Expand Up @@ -570,6 +571,10 @@ evil-magit affects.")
(unless evil-magit-popup-keys-changed
(dolist (change evil-magit-popup-changes)
(apply #'evil-magit-change-popup-key change))
(with-eval-after-load 'forge
(transient-remove-suffix 'magit-dispatch 'forge-dispatch)
(transient-append-suffix 'magit-dispatch "!"
'("@" "Forge" forge-dispatch)))
(setq evil-magit-popup-keys-changed t)))

(defun evil-magit-revert-popups ()
Expand All @@ -579,6 +584,8 @@ evil-magit affects.")
(dolist (change evil-magit-popup-changes)
(evil-magit-change-popup-key
(nth 0 change) (nth 2 change) (nth 1 change)))
(with-eval-after-load 'forge
(transient-suffix-put 'magit-dispatch "@" :key "'"))
(setq evil-magit-popup-keys-changed nil)))

;;;###autoload
Expand Down Expand Up @@ -638,18 +645,6 @@ using `evil-magit-toggle-text-mode'"
(t
(user-error "evil-magit-toggle-text-mode unexpected state"))))

;; TODO
;; ;; Make room for forge popup when loaded
;; (eval-after-load 'forge
;; '(progn
;; (evil-magit-define-key evil-magit-state 'magit-mode-map "p" 'magit-pull-popup)
;; (evil-magit-define-key evil-magit-state 'magit-mode-map "P" 'magit-push-popup)
;; (evil-magit-define-key evil-magit-state 'magit-mode-map "F" 'forge-dispatch)
;; (magit-change-popup-key 'magit-dispatch-popup :actions ?p ?P)
;; (magit-remove-popup-key 'magit-dispatch-popup :actions ?F)
;; (magit-define-popup-action 'magit-dispatch-popup ?p "Pulling" 'magit-pull-popup ?P t)
;; (magit-define-popup-action 'magit-dispatch-popup ?F "Forge" 'forge-dispatch ?f)))

;;; evil-magit.el ends soon
(provide 'evil-magit)
;; Local Variables:
Expand Down

0 comments on commit 1c6fbb3

Please sign in to comment.