外部输出到vim buffer AFTER命令完成

时间:2012-09-08 17:02:09

标签: shell vim racket

我目前正在Windows 7上使用gVim

运行如下命令:

:r! racket %

我能够在大约一半的时间内成功读取所需的输出。剩下的时间里,什么都没读。在shell执行终止并实际生成一些输出之前,输出中的vim读取似乎是一个问题。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

来自: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。