在当前的会话中,我设置了一个外部编辑器,我希望将其恢复为默认编辑器。那么,如何在当前的sessoin中重置为jshell中的默认编辑器?
编辑:
我在网上搜索,发现这个链接cr.openjdk.java.net/~rfield/tutorial/JShellTutorial.html没有帮助。我尝试使用DEFAULT作为选项(猜测默认启动脚本的行),没有帮助。
正如@Andreas所说。它写在文档中。
查找下面的工作步骤(假设您没有使用环境变量来更改默认编辑器)
jshell> /set editor your-editor
| Editor set to: your-editor
jshell> String foo = "foobar"
foo ==> "foobar"
jshell> /edit foo
这将使用片段String foo = "foobar";
打开您的编辑器jshell> /set editor -default
| Editor set to: -default
jshell> /edit foo
这将打开JShell Edit Pad与片段String foo = "foobar";