Repository navigation
Replies: 1 comment 2 replies
|
In inline mode, pressing Right inserts the suggestion -- to accept the line, you have to press Enter. In the suggestion list, pressing Up/Down inserts the suggestion -- to accept the line, you have to press Enter. It sounds like you want Right in the suggestion list to behave like Enter -- the suggestion is already inserted, so there is nothing left for Right to do, unless you want Right to be a synonym for Enter. That seems pretty dangerous -- if you press Left several times and then hold Right to go back to the end of the line then it will accidentally execute the command. Can you clarify what you're suggesting? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
tldr; at the end
Is your feature request related to a problem?
Currently the two suggestion UIs are mutually exclusive:
autosuggest.inlineonly shows the muted gray-text suggestion "unless the suggestion list is
active" (per the docs). That means once I open the Suggestion List with F2,
I lose the ability to just press Right/End to instantly accept the current
suggestion — I have to press Enter (or Esc then Right) instead.
Describe the solution you'd like
While the Suggestion List is open, let Right (or End) still accept the
currently highlighted suggestion immediately, the same way it does when the
list is closed — without requiring Esc/Enter first, and without closing the
list unless I want it to. In other words: let me browse with Up/Down and
quick-accept with Right at the same time, instead of the two modes being
exclusive.
Describe alternatives you've considered
I found
rl.issuggestionlistactive()(added in v1.9.30) andrl_buffer:hassuggestion()/rl_buffer:insertsuggestion()(added inv1.6.4), which look like they could be combined into a Lua
luafunc:binding on Right to work around this. If that's the intended way to get
this behavior, could the docs/examples cover it explicitly? If not, it'd be
great to have this as a built-in option (e.g. a
suggestionlist.allow_inline_acceptsetting, or documenting that Rightalready does this and I'm missing something).
Additional context
Clink version: 1.9.31.8c8e92
Terminal: Cmder running inside Windows Terminal(1.24.11321.0)
Relevant settings: autosuggest.enable=true, autosuggest.inline=true,
suggestionlist.default= true
tldr
All reactions