Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL keybindings: ctrl-y should not kill session #8307

Closed
scabug opened this issue Feb 18, 2014 · 7 comments
Closed

REPL keybindings: ctrl-y should not kill session #8307

scabug opened this issue Feb 18, 2014 · 7 comments
Labels
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Feb 18, 2014

scala, like (I think all) other interactive intepreters (like Ruby's irb, Python, etc) support things like C-r for reverse command search, C-a & C-e for home/end, C-k for killing (cutting) a line to the end, C-f and C-b for moving, C-d for forward-delete-char, etc; however, a really annoying deviation from this is the lack of support for C-y (paste last killed item from kill ring) (and therefore probably Alt-y as well), and not only lack of support but unexpected behavior: C-y actually stops the interpreter just the same as C-z.

(using C- to mean Ctrl-)

@scabug
Copy link
Author

@scabug scabug commented Feb 18, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8307?orig=1
Reporter: Erik Allik (eallik)

@scabug
Copy link
Author

@scabug scabug commented Feb 18, 2014

@adriaanm said:
This works for me on 2.10.x and 2.11.x (same version of Mac OS). Which version of Scala are you using?

@scabug
Copy link
Author

@scabug scabug commented Feb 18, 2014

@adriaanm said:
Oh, sorry I misread your description: most of these work, but you also want support for C-y.

@scabug
Copy link
Author

@scabug scabug commented Feb 18, 2014

Erik Allik (eallik) said (edited on Feb 18, 2014 6:17:33 PM UTC):
Yes, exactly.

Oh, but, Ctrl-z is already doing the right thing (suspending the interpreter (which is a bit broken as well, but I've opened another ticket for that)—not sure why you added that as well.

@scabug
Copy link
Author

@scabug scabug commented Apr 16, 2014

Kenji Matsuoka (kamatsuoka) said:
Most things about Scala bring me great joy, but this one thing is a giant pain.

@scabug
Copy link
Author

@scabug scabug commented Apr 19, 2015

Li Haoyi (lihaoyi) said (edited on Apr 19, 2015 1:33:18 AM UTC):
This works in the Ammonite REPL.

@ val x = 123
x: Int = 123
@ abcdefg <CTRL-C>
@
@ x = "<CTRL-Y>"
@ x = "abcdefg"
@scabug scabug added this to the Backlog milestone Apr 7, 2017
@SethTisue
Copy link
Member

@SethTisue SethTisue commented Apr 29, 2020

C-y actually stops the interpreter just the same as C-z

I'm not able to reproduce this in 2.11.12 or 2.12.11 or 2.13.1 or 2.13.2

lack of support for C-y (paste last killed item from kill ring)

on this kind of thing, we take whatever JLine 3 gives us (JLine 3 is what we're using as of Scala 2.13.2; before that we were on JLine 2)

it works for me in both 2.13.1 and 2.13.2, not sure about older versions

@SethTisue SethTisue closed this Apr 29, 2020
@SethTisue SethTisue modified the milestones: Backlog, 2.13.2 Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.