【发布时间】:2011-03-21 23:12:31
【问题描述】:
所以在 Scala REPL 中,我可以使用 ctrl-{p,n,a,e} 来执行上一行、下一行、行首和行尾。但是,如果我不能使用 ctrl-d 进行转发删除,我很快就会发疯。
有没有可能以某种方式实现这一目标?
我使用的是 Mac。
更新
将以下行添加到接受的答案以获得 ctrl-{a,e}。在 jline2 repo jline2 repo at GitHub 中可以找到更大的键绑定文件。
# CTRL-A: move to the beginning of the line
1=MOVE_TO_BEG
# CTRL-E: move the cursor to the end of the line
5=MOVE_TO_END
更新2
我刚刚安装了 Scala 2.9.0.final,我可以确认 ctrl-d 现在可以正常工作。它是向前删除,除非它在终止 shell 时是一个空行。
【问题讨论】:
标签: scala read-eval-print-loop