如何在Mac的终端在SML / NJ的REPL中移动光标? [英] How to move the cursor in SML/NJ's REPL in terminal on Mac?

查看:155
本文介绍了如何在Mac的终端在SML / NJ的REPL中移动光标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OSX的终端中,我打开 SML ,如果输入错误,我希望将光标移动到该位置以修改某些内容或添加/删除某些内容,但是一旦我点击键盘上的< - (左箭头), REPL 就会给我

In the terminal of Mac OSX, I open SML, if I type something wrong, I wish to move my cursor to that place to modify something or add/delete something, but once I hit <- (the left arrow ) on the keyboard, the REPL gives me

是的,那是 ^ [[D 的东西。

那么如何移动光标?

推荐答案

是的,SML / NJ的REPL不支持箭头键。您可以使用 rlwrap 工具来解决这个问题。这允许您使用左右箭头键在一行内导航,使用上下箭头键调用您之前输入的行。

Yes, the REPL of SML/NJ does not support arrow keys. You can use the rlwrap tool to fix this. That allows you to use the left and right arrow keys to navigate within a line and the up and down arrow keys to recall lines you've entered earlier.

重新使用Emacs编写您的SML文件,您也可以在Emacs缓冲区中运行SML。

If you're using Emacs to write your SML files, you can also run SML in an Emacs buffer.

这篇关于如何在Mac的终端在SML / NJ的REPL中移动光标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆