如何在 Emacs 中获取以某个键(组合)开头的命令列表?

发布于 2024-08-02 12:22:40 字数 165 浏览 1 评论 0原文

我可以使用 Ch c (describe-key-briefly) 并输入一个组合键,它会返回绑定到它的函数。但我也想仅键入组合键的前缀,并让它列出并描述绑定到以其开头的键序列的所有函数,例如“所有以 Cx< 开头的绑定键/代码>”。

I can use C-h c (describe-key-briefly) and type a key combination and it will return me the function bound to it. But I'd also like to type only a prefix of a key combination and have it list and describe all functions bound to key sequences starting with it, like "all bound keys starting with C-x".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

错々过的事 2024-08-09 12:22:40

执行组合键,然后执行 Ch.对于 Cx 的示例,请执行 Cx Ch。这也适用于子地图,例如 Cx r Ch 可以查看 Cx r 下的所有内容

Do the key combo then C-h. For your example of C-x, do C-x C-h. This also works with sub-maps, e.g. C-x r C-h to see everything under C-x r

自演自醉 2024-08-09 12:22:40

也不是每个前缀键都以这种方式工作(在其后面加上 Ch 以查看绑定)。

这里还有两个可以提供帮助的资源:

  • help-fns+.el。但要使用它,您需要有可用的键盘映射(例如作为变量的值,例如ctl-x-map)。与仅在键映射变量上使用 Ch v 不同,输出是人类可读的。

  • 冰柱 按键完成。只需输入前缀键,然后点击 S-TAB。缓冲区 *Completions* 显示所有可能的完成:键及其关联的命令(或 ... 如果它们本身就是前缀键)。对于多级前缀键(例如Cx r),候选键包括前缀键(例如前缀键r到部分完整前缀键Cx)。您可以通过这种方式在键盘映射层次结构中上下导航。您可以在候选者之间循环,并在任何候选者上点击 CM-RET 以查看他们的完整帮助。

It is also not the case that every prefix key works this way (follow it with C-h to see the bindings).

Here are two additional resources that can help:

  • Command describe-keymap, in help-fns+.el. But to use it you need to have the keymap available (e.g. as the value of a variable, such as ctl-x-map). Unlike just using C-h v on a keymap variable, the output is human readable.

  • Icicles key completion. Just type the prefix key, then hit S-TAB. Buffer *Completions* shows you all possible completions: the keys plus their associated commands (or ... if they are themselves prefix keys). For multiple-level prefix keys (e.g. C-x r) the candidates include prefix keys (e.g. prefix key r to partially complete prefix key C-x). You can navigate up and down the keymap hierarchy this way. And you can cycle among candidates and hit C-M-RET on any to see their complete help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文