[Feature request] Shift-enter in the REPL?
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 516
- Forks
- 103
- PR merge metrics
- No merged PRs in 30d
Description
DrRacket currently uses submit-predicate to determine whether an "enter" should submit the expression for evaluation.
The issue with submit-predicate is its inflexibility. Sometimes we might want to enter multiple lines, but the first line is already deemed "terminating" by submit-predicate, so doing so is not possible. One possible workaround is to allow multiple lines by default and let users enter twice in a row to indicate submission, but that is also not ergonomic when users want to enter only one line.
But there is another model, seen in notebook applications (Jupyter) and messaging apps (like Slack, Facebook Messenger). There are two keys: shift-enter and enter. One submits the input unconditionally. One simply adds a newline without submitting the input. I find this to be more flexible, and the language creator doesn't need to concern with submit-predicate anymore.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing DrRacket's REPL input handling around the submit-predicate mentioned in the issue. Compare the existing Enter behavior with the proposed Shift-Enter and newline behavior; done means the interaction model is defined and implemented without requiring language creators to customize submit-predicate.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100