开发者

Shell commands from vim

What is the best approach of using shell commands from vim? I know about the possibility of !开发者_如何学JAVAshell_command. But this doesn't know all commands e.g. export OSTYPE; make install So I have to run it outside vim. Is there better approach?


I know this is a bit late, but my preferred approach is suspending the vim process (Ctrl+z). You return to your shell/bash command prompt.

Then execute whatever command(s) you like.

Return to vim by typing fg


You can start a shell from Vim using the :sh command. When the shell exits (after the exit command or Ctrl+D) you return to Vim. The name for the shell command comes from the shell option.

For terminal Vim (on unix-like systems) you can also use Ctrl+Z to suspend Vim and get back to the shell from which it was run. To resume the Vim process, use the fg command.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜