在Emacs中设置特定模式下的快捷键(例如ido)
我认为有两个有些相关的问题:
1)在IDO中,我想将ido-restrict-to-matches更改为除C-SPC或C-@<以外的其他内容/kbd>。不幸的是我不知道如何告诉 emacs 我想要一个不同的快捷方式(比如 C-0)。
2) 我想保护我的 C-;,但每当 Flyspell-mode 运行时,它就会取代 C-;。我的定义在 .emacs 中为:
(global-set-key (kbd "C-;") 'mark-paragraph)
但显然 Flyspell 会覆盖这个...(尽管如此,如果我查看帮助 Mh k C-; 它确实说 mark-paragraph)
有人可以告诉我如何在这些情况下绑定/取消绑定键吗?它必须在不修改 ido.el 和 Flyspell.el 并重新构建的情况下工作,对吧?
非常感谢!
I have two problems which are somewhat related I believe:
1) In IDO I'd like to change ido-restrict-to-matches to samething else than C-SPC or C-@. Unfortunately I do not know how to tell emacs that I want a different shortcut (say C-0).
2) I'd like to protect my C-; but whenever flyspell-mode is running it overtakes C-;. My definition is in .emacs as:
(global-set-key (kbd "C-;") 'mark-paragraph)
but apparently flyspell overwrites this... (although even then, if I look in the help M-h k C-; it does say mark-paragraph
)
Could somebody please tell me how to bind/unbind keys in these conditions? It has to work without modifying ido.el and flyspell.el and re-building, right?
Thanks very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Flyspell 提供了对
C-;
绑定的自定义,因此您可以Mx 自定义 RET Flyspell-auto- Correct-Bing RET
或将类似的内容放入您的~/.emacs
:至于
ido
,你的问题有点令人困惑,因为它意味着有时你在迷你缓冲区之外使用 ido...ido.el 中的文档包含以下建议:
利用这些知识,您可以在您自己的“ido-my-keys”函数中更改键绑定:
还有一个专门用于迷你缓冲区的附加 ido 挂钩,但不清楚为什么您需要它:
ido-minibuffer-setup-钩子
。Flyspell provides a customization for the
C-;
binding, so you can eitherM-x customize RET flyspell-auto-correct-binding RET
or put something like this in your~/.emacs
:As for
ido
, your question is slightly confusing, because it implies there are times when you're using ido outside the minibuffer...The documentation in ido.el contains the following advice:
Using that knowledge, you can change the key bindings like this in your own "ido-my-keys" function:
There's an additional ido hook specifically for the minibuffer, too, but it's not clear why you would need that:
ido-minibuffer-setup-hook
.