How to move the cursor in SML/NJ's REPL in terminal on Mac?

守給你的承諾、 提交于 2019-12-11 07:26:36

问题


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

Yes, that ^[[D thing.

So how do I move the cursor?


回答1:


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.

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



来源:https://stackoverflow.com/questions/14489635/how-to-move-the-cursor-in-sml-njs-repl-in-terminal-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!