Skip to content

Decide when the REPL should enter multi-line mode #5183

Closed
@smarter

Description

@smarter

Right now when pressing Enter, the REPL will add a new line instead of running the current input if:

  • the input is incomplete (eg. "class Foo {")
  • the cursor is in the middle of a line

But after experimenting with it, I think that usually when pressing enter in the middle of a line, I expect the input to be run. I suggest adding another shortcut (maybe Shift+Enter, Ctrl+Enter is not technically possible on most terminals) to signify "I want to add a new line and not run this command". (We might also need a shortcut for the opposite problem: "I want to run this command and not add a new line")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions