2

如何在 utop 的多行命令中移动光标?例如:

utop # let ratio x y =
  let open Float.O in
  of_int x / of_int y
;;

执行上述命令后,如果我想编辑该行"let open...",我必须按一次向上箭头,然后按退格键,直到光标移动到“L”字母。有没有办法在不使用太多退格的情况下在 utop 中移动光标?(如编辑模式)

4

1 回答 1

4

对我来说,在 macOS 和 Linux 上,都utop可以使用标准的命令行移动键序列:

  • ←</kbd> or Ctrl+B to move one character left
  • →</kbd> or Ctrl+F to move one character right
  • Ctrl+←</kbd> to move one word to the left
  • Ctrl+→</kbd> to move one word to the right
  • Ctrl+A移动到行首
  • Ctrl+E移动到行尾

我敢肯定还有更多,但至少这些是我知道的。

于 2019-01-21T12:12:38.230 回答