Can I clean the repl?

后端 未结 8 1869
被撕碎了的回忆
被撕碎了的回忆 2020-12-23 13:50

I have played with a lot of code in a repl console, how can I clear it? I would like a fresh one without restarting it. Can that be done?

8条回答
  •  北海茫月
    2020-12-23 14:20

    For users of the Cursive IDE plugin for IntelliJ IDEA who end up here, like me:

    You can "cosmetically" clear the REPL (keeping your def'd symbols etc.) by clicking on this icon at the top of the REPL frame:

    There's no default key binding for this, but you can easily add one by opening your preferences, navigating to Keymap > Plugins > Cursive, and adding a binding for "Clear output for current REPL".

    Alternatively, you can right-click in the editor and access "Clear output for current REPL" via the REPL commands.

提交回复
热议问题