Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tuareg ocaml previous command

I am a new to ocaml. couldn't install rlwrap since I use a school computer. So I have to stick to emacs tuareg.

My question is: How to bind an up arrow key to the previous command in tuareg?

like image 643
heeh Avatar asked Dec 07 '25 06:12

heeh


1 Answers

Just use M+p instead of the arraw key :) But you can also add the following lines to your .emacs file:

(add-hook 'tuareg-interactive-mode-hook
 (lambda ()
   (local-set-key (kbd "<up>") 'comint-previous-input)
 )
)
like image 88
rafix Avatar answered Dec 08 '25 23:12

rafix