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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With