-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Entering insert mode with A and auto-suggestion places cursor at next to final character #83
Comments
Hi @gotgenes This behavior is a feature of default zsh-autosuggestions plugin (related code) for easier choosing the auto suggestion. You can config the option ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(
forward-char
end-of-line
vi-forward-char
vi-end-of-line
vi-add-eol
) This widget Thanks and regards |
Interesting! zsh-vim-mode's behavior is to place the cursor at the end of line (after the auto-suggested text) so I had gotten used to that behavior. |
Yes, it's better to keep compatibility with the |
Thanks for the suggestion. Just to be clear, the configuration you're suggesting is
Is this correct? When I use this configuration, and the example above, |
Hi @gotgenes , the configuration you provided is correct. For choosing the suggestion, you can use # This would bind ctrl + space to accept the current suggestion.
bindkey '^ ' autosuggest-accept |
Hi @gotgenes I’m so sorry for misunderstanding your issue, and it's not about choosing the auto-suggestion or not, just about the wrong cursor position. Now this issue has been addressed and fixed, please update your plugin to the latest version. Thanks and regards |
@jeffreytse Thanks for following up! Yes, sorry, I probably could have made the issue clearer. Confirmed fixed in the latest version! |
When an auto-suggestion is present, and the user is in normal mode, entering insert mode with
A
, the cursor will be placed before the final character.Sequence of events, above:
echo
echo $PATH
, cursor remains after theo
inecho
.H
of$PATH
; the expected behavior is the cursor is placed immediately after theH
.The expected behavior is that the cursor would be placed after the final character.
The text was updated successfully, but these errors were encountered: