Note that this blog post has been archived. Information may be out of date or incorrect.

Paste Mode in the Scala REPL

This is going to be quick but nonetheless awesome. Activate “Paste Mode” by typing :paste in the Scala REPL:

scala> :paste
// Entering paste mode (ctrl-D to finish)

class PasteMe {
    def didThat = "hooray"

// Exiting paste mode, now interpreting.

Have fun with Paste Mode :)