+{command}
-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.
或:
--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.
: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.
5条答案
按热度按时间zu0ti5jz1#
注意,现在语法已经更改,该行应该为(As per @sheharyar):
对后代来说,以前正确的台词是:
除了我以外的任何人都应该看!注意:这在vundle的Github README中。
bmp9r5qi2#
根据vim man page(
man vim
):或:
这完全取决于你想做什么。另外,如vundle自述文件所述,如果你像这样启动vim:
这将在不打开vim的情况下安装所有bundle选项。为了说明起见,请参阅vim documentation:
polhcujo3#
再复杂点的怎么样?
不知道这是否完全正确,但它对我很有效。谢谢@jvc26
at0kjp5o4#
我将为那些正在寻找更通用的解决方案的人添加另一个答案。
vim +command
可以运行一个Vim命令,但也可以从shell运行多个Vim命令。相反,可以在Ex-mode下启动Vim,并使用Here文档提供命令。这是我编写的脚本中的一个示例。它在文件中搜索模式,并在其前面插入一些文本。e4yzc0pl5#
是否
做你想做的事