在 Vim 中隐藏 shell 命令的输出

Han*_*lon 1 vim

如何在:!commandVim 中隐藏表单中任何命令的输出。我也不想在运行此命令(如Press ENTER or type command to continue)后从 Vim 收到任何消息。我希望 shell 命令完全在后台运行。

Yve*_*ves 6

“我希望 shell 命令完全在后台运行。” --- 这与 Vim 无关。这是关于如何在后台运行命令。

要不打印任何输出,您可以运行如下命令:yourCmd >/dev/null 2>&1,如果它不起作用,请使用nohuphttps://www.computerhope.com/unix/unohup.htm)。

如果不打印Press ENTER or type command to continue,你可以在 Vim 中执行如下命令:

:silent !<command>
Run Code Online (Sandbox Code Playgroud)

silent空白问题:
https://vi.stackexchange.com/questions/2809/silent-makes-my-vim-go-blank
Vim grep 导致字符暂时消失