I use R with Vim. Usually the R script file is open on top and there is a :terminal buffer with R running below. And I use a small vim-plugin [1] for sending commands from the editor to the REPL.
This has a few advantages, major being that you can run any language with a dynamic REPL this way, without changing your setup. Or, you can even have two files, written in two different languages, open side by side with a corresponding REPLs running beneath each of them. The downside of course is that you miss on auto-completion and other integrations like that. These are not impossible, but you would have to torture your Vim setup quite a bit in order to implement them.
[1]: https://github.com/karoliskoncevicius/vim-sendtowindow