Adapt for Magit's move to Transient

Magit now uses Transient instead of magit-popup, and we must adapt. Also had to
replace the recently removed magit-diff-buffer-file-popup with
magit-diff-buffer-file (similar but doesn't offer a popup before displaying the
diff).

Note some upstream packages haven't adapted to this change, but when they do we
might need similar fixes:
- magithub
- magit-gitflow
- magit-svn
This commit is contained in:
bmag 2019-02-15 19:31:01 +02:00 committed by Sylvain Benner
parent 63f9a92348
commit 99b355e2fa
5 changed files with 14 additions and 14 deletions

View File

@ -1210,8 +1210,8 @@ Other:
duianto)
- ~SPC g i~ to initialize a repository (thanks to Steven Allen)
- ~SPC m g y~ to find symbols (thanks to Daniel Ralston)
- ~SPC g f d~ for =magit-diff-buffer-file-popup= (thanks to Ag Ibragimov)
- Added feature to toggle =evil-magit= based on editing style (thanks to Muneeb
- ~SPC g f d~ for =magit-diff-buffer-file= (thanks to Ag Ibragimov and bmag)
- Add feature to toggle =evil-magit= based on editing style (thanks to Muneeb
Shaikh)
- Added =use-package= for deferred loading of evil-magit (thanks to Sylvain
Benner)

View File

@ -398,9 +398,9 @@
"C-k"))
:bepo
(progn
(magit-change-popup-key 'magit-dispatch-popup :actions ?t ?j)
(magit-change-popup-key 'magit-dispatch-popup :actions ?s ?k)
(magit-change-popup-key 'magit-dispatch-popup :actions ?S ?K))
(transient-suffix-put 'magit-dispatch "t" :key "j")
(transient-suffix-put 'magit-dispatch "s" :key "k")
(transient-suffix-put 'magit-dispatch "S" :key "K"))
:colemak-jkhl
(kl/evil-correct-keys 'visual magit-mode-map
"j"

View File

@ -110,7 +110,7 @@ Git commands (start with ~g~):
| ~SPC g b~ | open a =magit= blame |
| ~SPC g f f~ | view a file at a specific branch or commit |
| ~SPC g f l~ | commits log for current file |
| ~SPC g f d~ | diff commands for current file |
| ~SPC g f d~ | diff for current file |
| ~SPC g H c~ | clear highlights |
| ~SPC g H h~ | highlight regions by age of commits |
| ~SPC g H t~ | highlight regions by last updated time |

View File

@ -157,10 +157,10 @@
"gc" 'magit-clone
"gff" 'magit-find-file
"gfl" 'magit-log-buffer-file
"gfd" 'magit-diff-buffer-file-popup
"gfd" 'magit-diff-buffer-file
"gi" 'magit-init
"gL" 'magit-list-repositories
"gm" 'magit-dispatch-popup
"gm" 'magit-dispatch
"gs" 'magit-status
"gS" 'magit-stage-file
"gU" 'magit-unstage-file)

View File

@ -21,13 +21,13 @@
:on-enter (spacemacs/vcs-enable-margin)
:bindings
("C" magit-commit :exit t)
("d" magit-ediff-popup :exit t)
("d" magit-ediff :exit t)
("D" magit-diff-unstaged :exit t)
("F" magit-pull-popup :exit t)
("P" magit-push-popup :exit t)
("c" magit-commit-popup :exit t)
("f" magit-fetch-popup :exit t)
("l" magit-log-popup :exit t)
("F" magit-pull :exit t)
("P" magit-push :exit t)
("c" magit-commit :exit t)
("f" magit-fetch :exit t)
("l" magit-log :exit t)
("u" magit-unstage-file)
("w" magit-stage-file)
("n" spacemacs/vcs-next-hunk)