我偶尔会遇到使用制表符而不是空格的代码。是否有任何repl命令可以指示解释器将制表符作为正常空格进行临时处理 - 类似于:paste?
我偶尔会遇到使用制表符而不是空格的代码。是否有任何repl命令可以指示解释器将制表符作为正常空格进行临时处理 - 类似于:paste?
确实,:paste
听起来是一个不错的选择,但如果你真的想要覆盖按键绑定,你可以像这样提供自己的设置文件:
scala -Djline.keybindings=myfile
jline.jar
中的文件scala/tools/jline/keybindings.properties
:# Keybinding mapping for JLine. The format is:
# [key code]=[logical operation]
# CTRL-A: move to the beginning of the line
1=MOVE_TO_BEG
# CTRL-B: move to the previous character
2=PREV_CHAR
# CTRL-D: close out the input stream
4=EXIT
# CTRL-E: move the cursor to the end of the line
5=MOVE_TO_END
# CTRL-F: move to the next character
6=NEXT_CHAR
# CTRL-G: abort
7=ABORT
# BACKSPACE, CTRL-H: delete the previous character
# 8 is the ASCII code for backspace and therefor
# deleting the previous character
8=DELETE_PREV_CHAR
# TAB, CTRL-I: signal that console completion should be attempted
9=COMPLETE