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
Maybe one of these two plugins is what you need: