如何在Emacs中绑定Control-Home [英] How do I bind Control-Home in Emacs
本文介绍了如何在Emacs中绑定Control-Home的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想绑定Control-Home将光标放在文件的第一行。
我尝试过在.emacs文件中的以下选项,但没有任何一个工作。
I'd like to bind Control-Home to put the cursor at the first line of the file. I've tried the following options in my .emacs file, but none of them work.
(global-set-key "\C-<home>" 'beginning-of-buffer)
(global-set-key (kbd "\C-<home>") 'beginning-of-buffer)
(global-set-key "\C-^[OH" 'beginning-of-buffer)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [(control home)] 'beginning-of-buffer)
什么是正确的语法?
推荐答案
这似乎是VirtualBox的一个错误,在Windows主机上运行Ubuntu作为虚拟机。我为这个问题重新开了一张机票。 https://www.virtualbox.org/ticket/7065
This appears to be a bug with VirtualBox, running Ubuntu as a VM on a Windows host. I've reopened a ticket for the issue. https://www.virtualbox.org/ticket/7065
这篇关于如何在Emacs中绑定Control-Home的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文