在vim中:
:map 列出所有键映射:map {lhs} 列出以 {lhs} 开头的键序列的所有键映射。您如何搜索“以控制键开头的所有键映射”?
(我知道我仍然可以列出所有映射,将输出重定向到文件和 grep;但效率不是很高)。
谢谢 !
不,没有直接的、内置的方法。
你可以做的是:
:redir @a redirect output of next command to register a
:map list mappings
:redir END end redirection
:vnew edit new buffer in vertical window
:put a put content of register a
:v/<C-/d delete all lines not matching '<C-'
Run Code Online (Sandbox Code Playgroud)
你可以很容易地把它变成一个函数。