Add right arrow and end as completion keys #57746
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extends the feature added in #54983 by allowing it to work when there is more than one completion (allowing you to always accept the autosuggestion) and adds
Endas another completion key.This PR also centralizes the places where completions are managed, rather than in #54983 which split them up.
As in #54983, these two keys only accept completions when there is an autosuggestion presented (the gray text after what you have already typed). Pressing these keys repeatedly won't show a list of completions,
which matches the behavior of similar tools from other environments. These keys are the defaults for other autosuggestions tools I have used like zsh-autosuggestions
and fish shell. For users of zsh and fish, this is a more natural setup.