-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Revert gitsigns keymaps but fix vimdiff and fugitive conflict #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Originally, the keymaps for jumping to next and previous git hunks were ]c and [c. This was changed in nvim-lua#323 (83b65a1) because they overwrote the built-in vimdiff keymaps. However, the more traditional solution is to have ]c and [c *extend* the built-in keymap. This is what fugitive and gitgutter have been doing for years. Gitsigns doesn't do this by itself, but it has a recommended keymap configuration on which the present patch is based: https://github.com/lewis6991/gitsigns.nvim#keymaps The only thing I've added is to have the keymaps work in visual mode as well, which is the same behavior as the built in vimdiff keymaps.
I haven't really delved into gitsign enough so I can't comment on this. @antoineco seems like you approve this change? Have you tested it? Will I get a raft of "AAH YOU MOVED MY CHEESE!" angry comments if I merge this? :) |
Can I ask you to do some homework so we can move this PR along if in fact it makes sense to merge? Please go back and find the PRs from the folks who made the change you disagree with. Please at least try @-ing them to see if you can come to consensus on a solution. If you can, it's an easy merge from my end. If you can't, then we'll keep working on this. I really do appreciate the contribution! |
Hi @luizcalliari 👋 In #323 (83b65a1) you changed the Would you mind testing the patch in the current PR to confirm that it still accomplishes what you intended with your earlier change? |
@feoh sorry I completely missed your mention. Yes I do think that the change is sensible, and it works as expected for me 👍 |
The more I look at this, the more I think it's a good idea. @luizcalliari -f you respond fairly soonish with any objections we can discuss it, otherwise I think I'm gonna merge this. Nothing is set in stone, this is Git after all :) |
Hello guys!! I've no objection!! Good job @gangelop!!! |
Thank you everyone! Merged. |
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Revert gitsigns keymaps but fix vimdiff and fugitive conflict
Originally, the keymaps for jumping to next and previous git hunks were
]c
and[c
. This was changed in #323 (83b65a1) because they overwrote the built-in vimdiff keymaps.However, the more traditional solution is to have
]c
and[c
extend the built-in keymap. This is what fugitive and gitgutter have been doing for years.Gitsigns doesn't do this by itself, but it has a recommended keymap configuration on which the present patch is based:
https://github.com/lewis6991/gitsigns.nvim#keymaps
The only thing I've added is to have the keymaps work in visual mode as well, which is the same behavior as the built in vimdiff keymaps.