I use vim for editing code for some time now, I've written and been using this plugin for a while. you can check on the details on Github. Main feature of this plugin is that, it'll take the input test case in a buffer and show the output in another buffer. Also it saves the i/o history so that you can run all the cases at once! Main objective of this plugin was not to go back and forth between my shell and vim.