With the org-evil package, normal state >
on a headline executes
org-evil-demote
, but on normal text it executes evil-shift-right
. Two
questions: (1) How does this work? (2) It would be nice (and probably more
appropriate?) if a similar behaviour were bestowed on insert state C-t
, and
correspondingly on C-d
(H-t
and H-d
in my configuration), such that
evil-shift-right-line
and ...-left-...
would demote and promote headlines
when point is on headlines. How might one achieve that?
1 Answer
To get what you want you have to either remap the keys in your init
file or modify evil-org. You probably will want to do the former. And I think org-metaleft
and org-metaright
will do what you want (i.e. either promote or demote header or list item). You just need to set the keys for insert mode. So something like
(evil-define-key 'insert 'org-mode-map
"C-t" 'org-metaleft
"C-d" 'org-metaright)
should do the trick.