In evil
mode, I would like C-i
not to work as a tab key, which is the default behavior in Emacs. Also, I would not have the default vi
behavior simulated in Emacs evil
by evil-jump-forward
, but instead I would like to have C-i
work as the scroll-down-command
.
Then, since C-i
is mapped to <tab>
by default, and I would like <tab>
work as the usual indent-for-tab-command
, I need to bind <tab>
also. Here is a minimal setup:
(setq package-load-list
'((evil t)
(undo-tree t)
(goto-chg t)))
(package-initialize)
(require 'evil)
(evil-mode 1)
(define-key evil-normal-state-map (kbd "C-i") 'scroll-down-command)
(define-key evil-normal-state-map (kbd "<tab>") 'indent-for-tab-command)
The problem now is that this seems to confuse org-mode
. I think <tab>
in org-mode
only works correctly if <tab>
is not bound, in that case org-mode
will rebind it locally to org-cycle
.
So now I am not able to expand subtrees in org-mode. In fact, in org-mode
the <tab>
key is bound to indent-for-tab-command
instead of the desired org-cycle
command. How to solve this problem?
Note that the solution provided in Emacs, org-mode, evil-mode - TAB key not working does not work, since I rebind the <tab>
key.