Open xajik opened 6 days ago
I installed https://github.com/akinsho/git-conflict.nvim
and still face the same issues with c
- whatever starts with it, it turn on Change mode. What did I miss?
Is it possible to force replace key binding when diff is active?
Diff accept is very sensitive I must admit. I face weird behaviors too, but I guess it also has to do with the global autocmd integrity state of our own personal configs
Diff accept is very sensitive I must admit. I face weird behaviors too, but I guess it also has to do with the global autocmd integrity state of our own personal configs
I see there is already function to toggle key mapping when conflict is detected. But it doesn't work properly for me. Any suggestions?
Sorry for the ping @b0o, but can you try whether you can replicate this? I can't seem to reproduce at all
Sorry for the ping @b0o, but can you try whether you can replicate this? I can't seem to reproduce at all
Thanks, @aarnphm! Did you disable default c
- change, behavior on your side?
I asked the same on Reddit and got similar suggestion, but I don't want to remove it. https://www.reddit.com/r/neovim/comments/1gbneis/comment/ltngnj2/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
BTW, when I try to do :nmap c
without conflict, I see "no mapping".
But when I press c
it will enter change mode.
No I use default mapping
Also the conflict mappings are registered only if "AvanteConflictDetected" autocmd is available
This means my default there is no c-
mapping, which is intentional so that it won't conflict with users mapping
I can reproduce this if I wait for longer than timeoutlen
between pressing c
and o
/t
/c
/a
. If I set timeoutlen
really low, like 50-100ms, it's very hard to trigger the avante mapping. If I set it higher, it's easier.
After pressing c
and waiting timeoutlen
ms, vim enters operator-pending mode. While in this mode, normal mode mappings don't apply, as vim is waiting for a movement to complete the c
("change") operator. This is why trying to press o
/t
/c
/a
won't have the desired effect.
For now, I think the best workarounds are for the user to either increase their timeoutlen
, or to configure a prefix other than c
.
On Avante's side, one possible solution could be to override timeoutlen
with a higher value while the cursor is over a diff. This could be optional behind a configuration flag.
Thanks for investigating this. I'm good with increasing timeoutlen
from avante during diff mode (gated behind an option, we can provide a "reasonable" default)
edit: I use timeoutlen=300
and works for me
Describe the bug
I'm new to nvim, so please excuse my ignorance. After I try to apply the diff, I cannot accept it with the default key binding as it enters CHANGE mode instead.
":nmap ca"
press "c":