jvc*_*c26 50 vim bash shell zsh
关于从vim运行shell程序有很多SO问题.我想知道的是,是否有可能反过来 - 即
$ vim :BundleInstall
Run Code Online (Sandbox Code Playgroud)
例如,允许我作为脚本的一部分运行BundleInstall,而不是必须打开Vim并在首次运行时手动运行它?这可能吗?
jvc*_*c26 87
注意,现在语法已经改变,行应该读取(按照@sheharyar):
vim +PluginInstall +qall
Run Code Online (Sandbox Code Playgroud)
对于后代,以前,正确的路线是:
vim +BundleInstall +qall
Run Code Online (Sandbox Code Playgroud)
除了我以外的任何人都应该看!注意:这是在Github README for vundle中.
Dan*_*chi 24
我认为这就是你需要的:
你应该查看vim 手册页:
Run Code Online (Sandbox Code Playgroud)-c {command} {command} will be executed after the first file has been read. {command} is interpreted as an Ex command. If the {command} contains spaces it must be enclosed in double quotes (this depends on the shell that is used). Example: Vim "+set si" main.c Note: You can use up to 10 "+" or "-c" commands.
要么:
Run Code Online (Sandbox Code Playgroud)--cmd {command} Like using "-c", but the command is executed just before processing any vimrc file. You can use up to 10 of these commands, independently from "-c" commands.
这真的取决于你想做什么.另外,如vundle自述文件中所述,如果你像这样启动vim:
Run Code Online (Sandbox Code Playgroud)vim +BundleInstall +qall
这将安装所有捆绑选项而无需打开vim.只是为了澄清,从vim文档:
Run Code Online (Sandbox Code Playgroud):qall This stands for "quit all". If any of the windows contain changes, Vim will not exit. The cursor will automatically be positioned in a window with changes. You can then either use ":write" to save the changes, or ":quit!" to throw them away.
希望能帮助到你!
归档时间: |
|
查看次数: |
16709 次 |
最近记录: |