-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Labels
EnhancementIssue or pull request for enhancing existing functionality.Issue or pull request for enhancing existing functionality.JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.Needs DiscussionNeeds further discussion.Needs further discussion.REPLIssue or pull request specific to the project REPL.Issue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 3Likely to be challenging but manageable.Likely to be challenging but manageable.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.
Description
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:.
Metadata
Metadata
Assignees
Labels
EnhancementIssue or pull request for enhancing existing functionality.Issue or pull request for enhancing existing functionality.JavaScriptIssue involves or relates to JavaScript.Issue involves or relates to JavaScript.Needs DiscussionNeeds further discussion.Needs further discussion.REPLIssue or pull request specific to the project REPL.Issue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.Request for comments. Feature requests and proposed changes.difficulty: 3Likely to be challenging but manageable.Likely to be challenging but manageable.priority: NormalNormal priority concern or feature request.Normal priority concern or feature request.