Question

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?

Was it helpful?

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

OTHER TIPS

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.

 (define-key evil-normal-state-map (kbd "M-i") 'evil-jump-forward)
 (define-key evil-normal-state-map (kbd "M-o") 'evil-jump-backward)

I bind the function to other keys, so it's also work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top