R, Python, Scala etc. all come with REPL-environments, which I don\'t want to miss, however, most of the time editing text in them sucks, so I edit the code in vim, paste it
I recently wrote a plugin for a very similar purpose: vim-notebook which allows the user to keep a background process alive and to make it evaluate part of the current document (and to write the output in the document). It is intended to be used on notebook-style documents containing pieces of code to be evaluated.