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

Consider changing the default shortcut for accepting inline completions #16065

Open
krassowski opened this issue Mar 27, 2024 · 1 comment
Open

Comments

@krassowski
Copy link
Member

krassowski commented Mar 27, 2024

Problem

Currently inline completions are accepted using Alt + End.

Problems:

  • this shortcut is not very convenient to use (Alt and End are far away on most keyboards)
  • other applications use a different shortcut

Design constraints:

  • using just End or just is not desirable as these would interfere with the native cursor movement behaviour
  • ideally there would be a natural variant of the shortcut for partial acceptance ([Inline completion] Accept completion word by word and line by line #15531); for example if the "accept all" is Ctrl+, we could use Ctrl+Alt+ for word-by-word acceptance (there are also line-by-line and character-by-character options)
  • the shortcut should be intuitive to the users coming from other applications:
    • fish uses:
      • End or for full acceptance
      • Alt+ or Alt+F for word-by-word
    • IPython uses:
      • End or Ctrl+F for full acceptance
      • Alt+F for word-by-word
      • Ctrl+ for token-by-token (word-by-word but with a better implementation)
      • Alt+ for character-by-character
    • Copilot uses:
      • Tab for full acceptance
      • Ctrl+ for word-by-word
  • using Tab might be surprising because we use it to invoke completer
  • the shortcut should ideally not interfere with any browser or OS shortcuts

Proposed Solution

Add a default shortcut other than Alt + End for accepting the inline suggestion.

Additional context

We can keep Alt + End to avoid breaking the experience of users that got used to it (we can have multiple shortcuts here).

@krassowski krassowski added enhancement pkg:completer status:Needs Triage Applied to new issues that need triage labels Mar 27, 2024
@krassowski krassowski added this to the 4.2.0 milestone Mar 27, 2024
@JasonWeill JasonWeill added status:Needs Discussion and removed status:Needs Triage Applied to new issues that need triage labels Apr 2, 2024
@JasonWeill
Copy link
Contributor

Using any non-alphanumeric character in a shortcut will require us to test with a variety of keyboards, including small keyboards (such as laptop keyboards) and layouts used in Europe and Asia. Not all keyboards include an End key, or require chording with a Fn key to have the effect of pressing one, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants