为什么 vim 手册中没有提到像 q 这样的参数?

Why argument like q not mentioned in vim manual?

我知道 :q 命令 q!用于退出文件而不剃掉任何 changes.So 我期望这会记录在 vim 的手册中但没有找到任何

当我尝试搜索 vim 手册中的 q 命令时 man vim | grep q 我得到的结果与 quit

不同

vim [options] -q [errorfile] -q [errorfile] Start in quickFix mode. The file [errorfile] is read and the first error is displayed. If [errorfile] is omitted, the filename is obtained ":cn" command. See ":help quickfix".

那么为什么 vim 手册中没有提到像 q 这样的 vim 参数。学习 linux ,只是想确保这里没有遗漏任何东西?

Vim有内置手册,:help(或:h)ex命令。
只需执行 :h :q,您将获得 :quit 命令的文档。

:q是“命令”,不是“参数”。

just wanted to ensure not missing anything here

嗯,您错过了 $ man vim 的以下部分:

ON-LINE HELP
   Type ":help" in Vim to get started.  Type ":help subject" to get help on a
   specific  subject.   For example: ":help ZZ" to get help for the "ZZ" com-
   mand.  Use <Tab> and CTRL-D to complete subjects  (":help  cmdline-comple-
   tion").   Tags  are  present  to  jump  from one place to another (sort of
   hypertext links, see ":help").  All documentation files can be  viewed  in
   this way, for example ":help syntax.txt".

应该让您在 Vim 中尝试 :help :q

当你学习时,你不会 grep 手册,你 阅读 它们。

正如其他人所提到的,Vim 有一个在线帮助手册,您可以使用 :help TOPIC 导航到该手册。在你的情况下,那将是 :help :q.

您没有在手册页中找到它的原因是 Vim 有大量的命令、选项和功能,手册页会非常大。甚至 vi 的 POSIX 手册页也相当广泛,而且功能少得多。在手册页中搜索也比内置帮助系统更难。