Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 257
ttsiodras Avatar asked Apr 05 '14 08:04

ttsiodras


2 Answers

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

like image 77
Brian Tiffin Avatar answered Sep 28 '22 11:09

Brian Tiffin


I have almost no experience with terminals. However, I know that TAB is equivalent to C-i. Maybe that one would go through the terminal? If that works, you could add some key bindings for every TAB operation?

Try maybe C-h k TAB as well to see if TAB if sent on the wire.

like image 32
fniessen Avatar answered Sep 28 '22 10:09

fniessen