Running in a pipeline
Try:
quickedit() ( trap 'rm ~/temp$$' exit; vim ~/temp$$ >/dev/tty; cat ~/temp$$ ) The key is that, to be able to use vim normally, vim needs stdout to be the terminal. We accomplish that here with the redirect >/dev/tty.
For purposes of security, I put the temporary file in the user's home directory. For more on this, see Greg's FAQ Question 062. This eliminates the need to use an obscure file name.
Example:
When vim opens, I type This function succeeded. and save the file. The result on the screen looks like:
$ quickedit | grep succeeded This function succeeded. Even though the output of quickedit is redirected to a pipeline, vim still works normally because we have given it direct access to /dev/tty.
Running a program from within vim
As I mentioned in the comments, vim can pipe a file to a command. From within vim, for example, issue the command :w !pandoc -o file.pdf (Note: the space between w and ! is essential).