Code Monkey home page Code Monkey logo

Comments (16)

justbur avatar justbur commented on June 4, 2024

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.

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

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.

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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?

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

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.

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

I actually prefer M-{j,k} after trying it, but feel free to pick what you find sensible :)

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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.

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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...

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

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.

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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.

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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.

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

Nice, thank you!

from evil-magit.

justbur avatar justbur commented on June 4, 2024

I just had the thought that you could easily remove space (#20 (comment)) 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.

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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)

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

Great, that seems to work really well! DWIM tab :)

Do you plan to add that to evil-magit or spacemacs?

from evil-magit.

fbergroth avatar fbergroth commented on June 4, 2024

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 😜

from evil-magit.

justbur avatar justbur commented on June 4, 2024

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.

from evil-magit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.