gpt4 book ai didi

emacs - 显示以特定键开头的 Emacs 键绑定(bind)

转载 作者:行者123 更新时间:2023-12-02 05:23:47 25 4
gpt4 key购买 nike

我已阅读 this ,但我的问题不同。我想知道如何在 Emacs 中查看以特定键开头的键绑定(bind)。我想绑定(bind) f2,但想知道它当前绑定(bind)的是什么。按 C-h m 提示输入按键序列。在这里输入 f2 会导致 Emacs 等待我完成该链,因为 f2 本身什么也不做。如何查看以 f2 开头的所有键绑定(bind)?

最佳答案

F2F1F2C-h

一般来说,在任何前缀绑定(bind)后键入 F1C-h 将列出使用该前缀的所有绑定(bind):

describe-prefix-bindings is an interactive compiled Lisp function in help.el.

Describe the bindings of the prefix used to reach this command. The prefix described consists of all but the last event of the key sequence that ran this command.

F1 是两者中更可靠的一个(但只是非常稍微可靠一点),如以下文档摘录所详述。

M-: (info "(emacs) Misc Help") RET:

You can get a list of subcommands for a particular prefix key by typing C-h (describe-prefix-bindings) after the prefix key. (There are a few prefix keys for which this does not work--those that provide their own bindings for C-h. One of these is <ESC>, because <ESC> C-h is actually C-M-h, which marks a defun.)

M-: (info "(emacs) Keys") RET:

Typing the help character (C-h or <F1>) after a prefix key displays a list of the commands starting with that prefix. The sole exception to this rule is <ESC>: <ESC> C-h is equivalent to C-M-h, which does something else entirely. You can, however, use <F1> to display a list of commands starting with <ESC>.

M-: (info "(emacs) Help") RET:

C-h or <F1> means "help" in various other contexts as well. For instance, you can type them after a prefix key to view a list of the keys that can follow the prefix key. (A few prefix keys don't support C-h in this way, because they define other meanings for it, but they all support <F1> for help.)

M-: (info "(elisp) Key Binding Conventions") RET:

Don't bind C-h following any prefix character (including C-c).
If you don't bind C-h, it is automatically available as a help character for listing the subcommands of the prefix character.

关于emacs - 显示以特定键开头的 Emacs 键绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10330510/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com