emacsorg-modeevil-mode

Emacs, org-mode, evil-mode - TAB key not working


I've been working with VIM for decades, and I've become quite proficient in it. I was however sort-of... seduced by Emacs's org-mode, and in order to try it, I installed Emacs and Evil.

Evil satisfies most of my VIM-related muscle memory, so I proceeded with my testing of org-mode - and met my first issue: when I spawn Emacs in its own window (i.e. emacs plan.org) then the TAB key works, opening and closing my plan's sections just fine. However, TAB does nothing when I use Emacs in text mode (i.e inside my XTerms, via "emacs -nw plan.org"). And that's the state that I am mostly interested in, since I usually work from inside screen/tmux over SSH connections.

If it's a conflict with Evil-mode, I don't understand why - I am unaware of any TAB functionality in VIM's normal mode (which is what we're in when opening/closing org-mode sections).

Any Emacs-guru out there with a suggestion on why this happens?


Solution

  • Try

    (setq evil-want-C-i-jump nil)
    

    in your ~/.emacs before

    (require 'evil) 
    

    Evil has, in evil-maps.el

    (when evil-want-C-i-jump
      (define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward))
    

    That should give you org-mode Tab functionality back