我目前在 Windows 7 上使用 gVim
运行如下命令:
:r! racket %
我能够在大约一半的时间内成功读取所需的输出。其余时间,什么也不读。在 shell 执行终止并实际生成一些输出之前,vim 在输出中读取似乎是一个问题。
有任何想法吗?
从:help :r!
:[range]r[ead] !{cmd} Execute {cmd} and insert its standard output below
the cursor or the specified line. A temporary file is
used to store the output of the command which is then
read into the buffer. 'shellredir' is used to save
the output of the command, which can be set to include
stderr or not. {cmd} is executed like with ":!{cmd}",
any '!' is replaced with the previous command |:!|.
可能是您需要设置:help shellredir
为包含 stderr。