[SI-8307] REPL keybindings: ctrl-y should not kill session Created: 18/Feb/14  Updated: 19/Apr/15

Status: Open
Project: Scala Programming Language
Component/s: Repl / Interpreter
Affects Version/s: None
Fix Version/s: Backlog

Type: Bug Priority: Major
Reporter: Erik Allik Assignee: Unassigned
Resolution: Unresolved Votes: 3
Labels: community

OS X 10.9


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-)

Comment by Adriaan Moors [ 18/Feb/14 ]

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

Comment by Adriaan Moors [ 18/Feb/14 ]

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

Comment by Erik Allik [ 18/Feb/14 ]

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.

Comment by Kenji Matsuoka [ 16/Apr/14 ]

Most things about Scala bring me great joy, but this one thing is a giant pain.

Comment by Li Haoyi [ 19/Apr/15 ]

This works in the Ammonite REPL.

@ val x = 123
x: Int = 123
@ abcdefg <CTRL-C>
@ x = "<CTRL-Y>"
@ x = "abcdefg"

Generated at Tue Jun 19 03:06:27 CEST 2018 using JIRA 7.9.1#79001-sha1:60970b42586a2ec2760ed6cfe825b26961e62b9e.