Skip to content

[RFC]: add support for custom key bindings in the REPL #2647

Open

Description

Description

This RFC proposes adding support for custom key bindings in the REPL.

Some prior art:

  • Julia: supports key bindings for actions like editing, cursor movement, and program control. Here's the full list of actions

  • IPython: They also support multiple key bindings for a single action. Similar to how we have the right arrow and TAB to auto-complete a suggestion. They also have auto-closing pairs as "key bindings", to trigger the 'auto-close-parentheses' is mapped to the key (. Here's the full list of actions

We would also want to support having custom key bindings for current actions like Ctrl+O for inserting a new line, or right arrow for accepting a suggestion, or the TAB key to toggle the completions etc.

Would suggest reading the above lists of actions for further discussion on what we should support

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    EnhancementIssue or pull request for enhancing existing functionality.JavaScriptIssue involves or relates to JavaScript.Needs DiscussionNeeds further discussion.REPLIssue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.difficulty: 4Likely to be moderately difficult.priority: NormalNormal priority concern or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions