Open Praful opened 1 year ago
I also have problems with zsh-autosuggestion
, namely whichever key is bound to select the proposed suggestion (normally the arrow up/down keys) stops working when using this plugin.
What is the recommended way to complete the selected zsh-autosuggestion when using this?
I would be very interested in a solution here as well. When I don't have zsh-vi-mode installed, my keybinding to accept an autosuggestion works flawlessly. It stops working as soon as I enable vi-mode. (The default vi-mode of zsh does work however).
This is the keybinding:
bindkey '^ ' autosuggest-accept
Interestingly, if I source my .zshrc
it works afterwards.
General information
Please report the following information as possible as you can:
Basic examination
Problem description
Before installing
zsh-vi-mode
, I had the following lines in my.zshrc
file:These defined keystrokes for
zsh-autosuggestion
.After installing
zsh-vi-mode
, the second keybinding (^w
) didn't work. I followed the instructions and created the following in my.zshrc
:These didn't work initially. If I use the default alternative key for
forward-char
(which is right arrow) that works. After using the right arrow key, both the above bindings work!bindkey
confirms the definitions for^o
and^w
have changed after using the right arrow key.Reproduction steps
zvm_after_lazy_keybindings()
as above.bindkey
.^o
to accept the line.^O
appears instead of the cursor moving to the end of the suggestion.^o
.^o
or^w
. Both work.bindkey
. They are different from those seen in step 3 for^o
and^w
.Expected behavior
After defining
^o
and^w
as above, pressing^o
should take the cursor to the end of the suggestion.^w
should take the cursor to the end of the next word.