I want to prepend a line to a snippet already entered in the REPL. The screenshot shows the cursor at the point that the newline
should be inserted.
I do not know how to do this since hitting return
will try to execute the snippet. I also tried CMD-Ret
and Alt-Ret
: same behavior. Is there any way to do this without retyping the entire snippet?
Control-V, Control-J does does the trick, similarly as in an interactive terminal. Control-V means "the next character should be treated literally" and Control-J generates a newline character.