score:25

Accepted answer

Type:

:help

and you see, that

:load <path>               load and interpret a Scala file

solves your problem.

In some circumstances, pasting the code might be preferable though, but then

:paste

might be your friend then. It helps inserting a whole block without feedback, line by line, until you hit Ctrl + D. In some cases this is significant for the code interpretation.


Related Query

More Query from same tag