Closed
Description
openedon Mar 26, 2024
Description
This RFC proposes adding support for multi-line editing to the REPL. Currently, when a user does
In [29]: function foo() {
// ...
}<|>
where <|>
represents the cursor, hitting the up arrow auto-completes previous commands, rather than allows a user to move the cursor up to edit existing content.
It would be nice to allow users to support multi-line editing, as otherwise they need to hit ENTER and start over.
Related Issues
No.
Questions
- What are the pitfalls and considerations for implementing this? For one, could be tricky to implement due to needing to listen for certain keypress sequences and having to manipulate cursor position via ANSI escape sequences.
- Should the default be to move the cursor up? Or is there a use case for hitting the up arrow in multi-line mode and auto-completing previous commands?
Other
No.
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
Labels
Issue or pull request for enhancing existing functionality.Issue involves or relates to JavaScript.Needs further discussion.Issue or pull request specific to the project REPL.Request for comments. Feature requests and proposed changes.Likely to be challenging but manageable.Normal priority concern or feature request.