I am using the Scala REPL with the integrated terminal. I open the Scala REPL on the terminal and then send small snippets with
workbench.action.terminal.runSelectedText
(which I have bound to a shortcut). This works fine when the snippets have to be run literally. But sometimes when definitions are mutually recursive, Scala requires that I start the code with the command
scala> :paste
and then finish with a ctrl+d. Is there a way that I can automatically wrap the selected text in a ":paste" + selected_text + "^d"?
Thanks, Christian
${selectedText}
variable holds currently selected text, andsendSequence
supports variable substitution, hence inOpen Keyboard Shortcuts (JSON)
try addingwhere
\u0004
isControl+D
, and\u000D
isEnter
. Now tryconsole
from sbtconsole
cmd+shift+T