简体   繁体   English

tuareg ocaml上一个命令

[英]tuareg ocaml previous command

I am a new to ocaml. 我是ocaml的新手。 couldn't install rlwrap since I use a school computer. 因为我使用学校的电脑,所以无法安装rlwrap。 So I have to stick to emacs tuareg. 所以我必须坚持使用emacs tuareg。

My question is: How to bind an up arrow key to the previous command in tuareg? 我的问题是:如何将一个向上箭头键绑定到tuareg中的上一个命令?

Just use M+p instead of the arraw key :) But you can also add the following lines to your .emacs file: 只需使用M + p而不是arraw键:)但您也可以将以下行添加到.emacs文件中:

(add-hook 'tuareg-interactive-mode-hook
 (lambda ()
   (local-set-key (kbd "<up>") 'comint-previous-input)
 )
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM