Solve the problem that TAB fails in org-mode in evil mode

Original link:

In Org, TAB is bound to org-cycle , which can be very convenient to fold/expand the content under a certain title. At that time, in the normal mode of evil, TAB was bound to evil-jump-forward , which is Corresponding to Vim

  • Ctrl-i jump forward to the next (newer) location.
  • Ctrl-o to jump back to the previous (older) location.

At the same time, because in the terminal, TAB and Ci send the same keycode 9 (ie Character Tabulation ), which leads to the above behavior.

Since most of the authors don’t use evil’s jump function, a simple fix is ​​to simply turn it off:

 (setq evil-want-Ci-jump nil )

Note: this initialization needs to be performed before evil is loaded. If you use use-package , you can use the following methods:

 (use-package evil :custom ((evil-want-Ci-jump nil )) :config (evil-mode))

If you want to keep the jump function of evil, you can try to distinguish TAB from Ci

This article is reprinted from:
This site is for inclusion only, and the copyright belongs to the original author.