Skip to content
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

Proposal: re-trigger autosuggestion with right key (and similar) #13992

Closed
krassowski opened this issue Mar 26, 2023 · 0 comments · Fixed by #14027
Closed

Proposal: re-trigger autosuggestion with right key (and similar) #13992

krassowski opened this issue Mar 26, 2023 · 0 comments · Fixed by #14027
Labels
autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) needs-decision

Comments

@krassowski
Copy link
Member

Once auto-suggestion was discarded it is not currently possible to re-trigger hinting in place (user needs to to type another character and press backspace, or to delete last character and type it again). This is a proposal to re-trigger the suggestions with the same set of keys as is used to accept them (right, ctrl + f etc).

To avoid accidental acceptance of newly shown suggestion a configurable debouncer of 200ms could be activated when suggestion is re-triggered using the proposed mechanism.

It is not currently possible to opt-in for the proposed behaviour by defining a custom shortcut.

Can I ask anyone interested to indicate if they would be happy with an addition of such a shortcut by default (:+1: or :-1: )?

@krassowski krassowski added autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) needs-info labels Mar 26, 2023
Carreau added a commit that referenced this issue Mar 30, 2023
This is a pre-requisite of #13992 but the shortcut is disabled by
default by `never` filter. The idea here is that this could be merged
as-is (ideally after rebasing on top of #13991) to allow user testing.
Once this is in, users can emulate part of the behaviour proposed in
#13992 with the following snippet:

```python
custom_shortcuts = [
    {
        "command": "IPython:auto_suggest.resume_hinting",
        "new_keys": ["right"],
        "new_filter": "default_buffer_focused & ((vi_insert_mode & ebivim) | emacs_insert_mode)"
    }
]
%config TerminalInteractiveShell.shortcuts = custom_shortcuts
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosuggestions Related to fish-like autosuggestion feature (as opposed to the tab-completions) needs-decision
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant