In Vim, run command and redirect stdout to specific buffer
<p>Say I open two buffers side by side and enter the source code into buffer 1. I want to run the compiler (or any command line program) and see its output (<code>stdout</code>) in buffer 2.</p>

<p>How do I feed the current or specific buffer as <code>stdin</code> to this command line program? If this it not possible, I can save source code to the file and specfy it as parameter to compiler; but anyway I want to see output in buffer 2.</p>