Closed fbergroth closed 8 years ago
Can you explain what they are supposed to do? SPC
is bound to scroll-up
in magit-diff-mode-map
for me. I tried playing with the commands, but I wasn't sure where to use them.
Instead of pulling directly, I like to fetch a branch. This gives me a list of unpulled commits that was added upstream. With regular Magit bindings, I can go through the commits with n
and p
and scroll through their content with SPC
, without loosing focus of the status buffer. Now I need to press RET
and q
on every commit to do the same.
The same procedure can be used to step through the magit-log buffer.
Interesting. That is convenient. I didn't know about it. So DEL
is not changed, but SPC
is if you're on spacemacs
How about S-SPC
and S-DEL
? Is that too weird?
Yeah, M-{j,k}
is pretty awkward. S-SPC
might be a better choice, still slightly weird though. Ideally it should not require a modifier, but I don't have any better suggestions.
I actually prefer M-{j,k}
after trying it, but feel free to pick what you find sensible :)
That's easy. I can add that np. I do like the experience of default magit, but it's conflicting with spacemacs which is a problem unfortunately.
Actually, that will conflict in git-rebase mode. I had M-jk
to move commits up and down, and it appears that magit intends to have the same experience in that buffer (SPC
shows the commit and scrolls it).
This would be more complicated to do, but I like the idea of TAB
to do this...
TAB
is a nice idea!
Personally I never use the spacemacs leader inside magit, but perhaps others do. Otherwise M-m
could be used as the spacemacs leader just inside magit.
I'll play with getting TAB
to work, but it might be complicated so no promises.
Personally I never use the spacemacs leader inside magit, but perhaps others do. Otherwise M-m could be used as the spacemacs leader just inside magit.
That would be fine with me, but I'm pretty sure people will complain.
I added S-SPC
and S-DEL
just to test them, since they don't conflict with anything that I'm aware of. I'll look into TAB
when I get a chance.
Nice, thank you!
I just had the thought that you could easily remove space (https://github.com/justbur/evil-magit/issues/20#issuecomment-191246489) in your personal config with this line
(add-hook 'magit-status-mode-hook (lambda () (spacemacs-leader-override-mode -1)))
But I found a bug in bind-map by testing it. It's fixed now but you'll either have to wait for melpa or manually update to try it.
wasn't that bad. try this
(defun evil-magit-section-toggle-or-show-diff-up ()
(interactive)
(magit-section-case
((magit-root-section))
((commit stash branch)
(call-interactively 'magit-diff-show-or-scroll-up))
(t
(call-interactively 'magit-section-toggle))))
(defun evil-magit-section-toggle-or-show-diff-down ()
(interactive)
(magit-section-case
((magit-root-section))
((commit stash branch)
(call-interactively 'magit-diff-show-or-scroll-down))
(t
(call-interactively 'magit-section-cycle-global))))
(evil-define-key evil-magit-state magit-mode-map
"\t" 'evil-magit-section-toggle-or-show-diff-up
[backtab] 'evil-magit-section-toggle-or-show-diff-down)
Great, that seems to work really well! DWIM tab :)
Do you plan to add that to evil-magit or spacemacs?
That would be fine with me, but I'm pretty sure people will complain.
Your recent updates seems to have broken the SPC leader inside Magit on Spacemacs :stuck_out_tongue_winking_eye:
Do you plan to add that to evil-magit or spacemacs?
Was thinking of proposing something like this to magit, but I'm not sure really.
Your recent updates seems to have broken the SPC leader inside Magit on Spacemacs
Yep, thanks. My "fix" in bind-map wasn't working correctly. It's reverted now.
These commands are really convenient when skimming through a list of commits. Magit binds these to
SPC
andDEL
.Maybe
M-{j,k}
would be suitable keybindings?