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

Open
scabug opened this Issue Feb 18, 2014 · 6 comments

Comments

Projects
None yet
1 participant
@scabug
Copy link

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

This comment has been minimized.

Copy link
Author

scabug commented Feb 18, 2014

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

@scabug

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment