如何在 Vim 映射列表中搜索? [英] How to search in the Vim mapping listing?

查看:24
本文介绍了如何在 Vim 映射列表中搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 :map 提供 Vim 中所有映射的列表.但是,我无法搜索列表.我很惊讶地看到它在与通常的 Vim 帮助文件不同的不同类型的窗口中打开.有没有办法以通常的形式提供它?

Using :map provides a list of all mappings in Vim. But, I am unable to search through the list. I am surprised to see it being opened in a different type of window unlike usual Vim help files. Is there a way to have it available in the usual form?

推荐答案

不要感到惊讶.:map:help 根本不相关,所以没有任何理由期望它像 :help 一样工作>.

Don't be surprised. :map is not related at all with :help so there's no reason whatsoever to expect it to work like :help.

你可以给 :map 一个参数来缩小列表的范围:

You can give :map an argument to narrow-down the listing:

:map ,

使用wildmenu 和/或wildmode 的正确值,您可以使用制表符完成:map:

With the right values for wildmenu and/or wildmode, you can tab-complete :map:

:map ,<Tab>

您还可以使用 列出当前的映射:

You can also list the current mappings with <C-d>:

:map <C-d>

您还可以使用 :map 的特定于模式的变体来获得更易于管理的列表:

You can also use the mode-specific variants of :map to get a more manageable list:

:imap ,
:nmap ,
:xmap ,
and so on…

但请记住,:map 仅列出自定义映射(由您或您的插件制作).如果您需要默认映射列表,请查看 :help index.

But keep in mind that :map only lists custom mappings (made by you or your plugins). If you want a list of default mappings, check out :help index.

这篇关于如何在 Vim 映射列表中搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆