gpt4 book ai didi

emacs - 将多个 Emacs 键绑定(bind)分配给单个命令?

转载 作者:行者123 更新时间:2023-12-04 17:41:26 24 4
gpt4 key购买 nike

我给 ErgoEmacs mode a 试试看我能不能更舒服地使用 Emacs。它的一些键绑定(bind)相当直观,但在许多情况下,我不想完全替换默认值。

例如,在 ErgoEmacs 的导航快捷结构的上下文中,M-h 作为 C-a 的替代品是有意义的——但我希望能够同时使用两者,而不仅仅是 M-h。我尝试简单地复制命令:

;; Move to beginning/ending of line
(defconst ergoemacs-move-beginning-of-line-key (kbd "C-a")) ; original
(defconst ergoemacs-move-end-of-line-key (kbd "C-e")) ; original
(defconst ergoemacs-move-beginning-of-line-key (kbd "M-h")) ; ergoemacs
(defconst ergoemacs-move-end-of-line-key (kbd "M-H")) ; ergoemacs

但是 Emacs 只是简单地用第二个键绑定(bind)覆盖了第一个键绑定(bind)。解决这个问题的最佳方法是什么?

最佳答案

重新发布 ergo-emacs mailing list 的回复:

夏李说:

that's very easy.
in the ergoemacs-mode.el file, there's this line (load "ergoemacs-unbind") just comment it out. That should be all you need to do. However, note that ErgoEmacs keybinding defines those common shortcuts such as Open, Close, New, Save... with keys Ctrl+o, Ctrl+w, Ctrl+n, Ctrl+s etc. About 7 of them or so. So, i think some of these will hit on emacs traditional bindings with Ctrl. if you are new to ErgoEmacs and trying to explore it, you might just try starting with few keys. this page might have some useful info: http://code.google.com/p/ergoemacs/wiki/adoption thanks for checking out ErgoEmacs!
Xah ∑ http://xahlee.org/

关于emacs - 将多个 Emacs 键绑定(bind)分配给单个命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3048230/

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