覆盖EMACS org.mode中的Ctrl-TAB [英] Override Ctrl-TAB in EMACS org.mode
问题描述
在我的 .emacs 文件中,我使用:
(global-set-key(kbd< C-tab>)'switch-view)
,除了在组织模式下,它可以运行。
描述在 org.el
中定义,如下所示:
(org-defkey org-mode-map [(control tab)]'org-force-cycle-archived)
这意味着它仅在组织模式的本地键盘映射之一的 org-mode-map
中有效。以下代码添加了在组织模式启动时运行的挂钩。它只是从 org-mode-map
中删除该键绑定。
(add-hook'org-mode-hook
'(lambda()
(define-key org-mode-map [(control tab)] nil)))
将此代码添加到.emacs文件中,然后重新启动emacs。
I would like to use Ctrl + Tab in EMACS for my own use, but Emacs org mode already has this bound. How can I use my own binding instead of the org-mode binding.
In my .emacs file I use:
(global-set-key (kbd "<C-tab>") 'switch-view )
and it works everywhere except in org-mode
The key binding you describe is defined in org.el
like this:
(org-defkey org-mode-map [(control tab)] 'org-force-cycle-archived)
This means that it is only valid in org-mode-map
, one of org-mode's local keymaps. The following code adds a hook that is run when org-mode starts. It simply removes that key binding from org-mode-map
.
(add-hook 'org-mode-hook
'(lambda ()
(define-key org-mode-map [(control tab)] nil)))
Add this code to your .emacs file and then restart emacs.
这篇关于覆盖EMACS org.mode中的Ctrl-TAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!