これは、必要な を含む非常に最小限のキーバインド プロパティ ファイルです^D
。
# CTRL-B: move to the previous character
2: PREV_CHAR
# CTRL-D: delete the previous character
4: DELETE_NEXT_CHAR
# CTRL-F: move to the next character
6: NEXT_CHAR
# 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
# CTRL-J, CTRL-M: newline
10: NEWLINE
# ENTER: newline
13: NEWLINE
# CTRL-N: scroll to the next element in the history buffer
14: NEXT_HISTORY
# CTRL-P: scroll to the previous element in the history buffer
16: PREV_HISTORY
# CTRL-V: paste the contents of the clipboard (useful for Windows terminal)
22: PASTE
# DELETE, CTRL-?: delete the previous character
# 127 is the ASCII code for delete
127: DELETE_PREV_CHAR
それをファイルに入れて、次のように scala を呼び出します。
scala -Djline.keybindings=/path/to/keybindings.properties
または、 を通過させますJAVA_OPTS
。インターネットでどのキーバインディングが存在するかを調べ:keybindings
、Scala から試してデフォルトを確認する必要があります (ただし、実際のキーバインディングは反映されません)。