3 comments

[ 0.20 ms ] story [ 19.2 ms ] thread
> while visually useful, i dislike the leading "|" (pipe) at the beginning of a continuation - it breaks copy and paste.

Do you mean copying stuff from the REPL to something else?

Because this works:

  scala> scala> def foo(x: Int) = {

  // Detected repl transcript paste: ctrl-D to finish.
  
       |     x > 1
       | }
  foo: (x: Int)Boolean
  // Replaying 1 commands from transcript.
  
  scala> def foo(x: Int) = {
      x > 1
  }
  foo: (x: Int)Boolean
usually i'm pasting somewhere else, e.g. some code i'm composing in an editor (and using the REPL to help debug it). thanks for the tip, though, i don't know if i have ever pasted it back into the REPL itself.
For this use-case, :save might be useful, although I agree that's it is still not as easy as copy-paste.