本文介绍了Emacs可以区分ctrl-r和ctrl-shift-r吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 + 绑定到'isearch-backward 并绑定 + + 到'tags-apropos 但是我无法区分两个键



可以emacs区分 + 和 + + ?什么应该进入我的.emacs文件以允许这个键盘绑定?

解决方案

是的。



pre> (global-set-key(kbdCr)'isearch-backward)
(global-set-key(kbdCSr)' apropos)

找出这种问题的答案的方法是在键上做一个帮助,并键入您感兴趣的按键。Emacs在帮助缓冲区中显示的是您可以传递给宏的字符串 kbd


I'd like to bind + to 'isearch-backward and bind + + to 'tags-apropos but I can't distinguish between the two key presses.

Can emacs differentiate between + and + + ? What should go into my .emacs file to allow this keybinding?

解决方案

Yes.

(global-set-key (kbd "C-r") 'isearch-backward)
(global-set-key (kbd "C-S-r") 'tags-apropos)

The way to figure out the answer to this kind of question is to do help on a key , and type the keystrokes you're interested in. What Emacs shows in the Help buffer is the string you can pass to the macro 'kbd.

这篇关于Emacs可以区分ctrl-r和ctrl-shift-r吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 21:12