3

how to overwrite keybinding in orgmode, that tabbar still works with [C-Tab] and [C-S-iso-lefttab]

I tried it this way: (add-hook 'org-mode-hook (lambda () (global-set-key [C-S-iso-lefttab] 'tabbar-backward) (global-set-key [C-tab] 'tabbar-forward) ))

My Emacs version is 23.1 and I am using org-mode shipped with Emacs.

Rockiger
  • 422
  • 3
  • 11

3 Answers3

7

try the following

(define-key org-mode-map (kbd "C-<tab>") 'tabbar-forward)

(define-key org-mode-map (kbd "C-S-<tab>") 'tabbar-backward)

Oleg Pavliv
  • 20,462
  • 7
  • 59
  • 75
1

For the sake of following org-mode tutorial rules, if you have the following in your .emacs:

(require 'org-install)

The above will not work. You can brute force your way out of it and add

(require 'org)

But a more elegant solution would be to embed your (define-key ...) in

(eval-after-load "org"
  '(progn
     (define-key org-mode-map (kbd "C-<tab>") 'tabbar-forward)))
0

For the general solution, see Globally override key binding in Emacs

You create your own minor mode with your preferred keybindings and enable it globally, so that it overrides all other keybindings.

Community
  • 1
  • 1
Ryan C. Thompson
  • 40,856
  • 28
  • 97
  • 159