Somelauw / evil-org-mode

Supplemental evil-mode keybindings to emacs org-mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Keys are not bound

Linuus opened this issue · comments

A while ago tab stopped working correctly (could not fold/unfold drawers). It turned out that other people had the same issue: https://www.reddit.com/r/emacs/comments/aidi7r/cant_fold_logbook/
To fix it, I need to have this:

    (with-eval-after-load 'evil
      (evil-define-key 'normal outline-mode-map (kbd "<tab>") #'org-cycle)
      (evil-define-key 'normal outline-mode-map (kbd "TAB") #'org-cycle))

I also noticed that other keys are not bound correctly as well, like ) is bound to evil-forward-sentence-begin instead of evil-org-forward-sentence etc.

What could cause these issues? Does evil-org need an update or have I screwed up my config? :)

My evil-org config looks like this:

  (use-package evil-org
    :ensure t
    :after org
    :config
    (require 'evil-org-agenda)
    (with-eval-after-load 'evil
      (evil-define-key 'normal outline-mode-map (kbd "<tab>") #'org-cycle)
      (evil-define-key 'normal outline-mode-map (kbd "TAB") #'org-cycle))
    (evil-org-agenda-set-keys)
    (add-hook 'org-mode-hook 'evil-org-mode)
    (add-hook 'evil-org-mode-hook
              (lambda ()
                (evil-org-set-key-theme))))
commented

I don't think it's just you. I have the same problems setting up emacs from scratch.

The same problem occurs with <return> bindings. I think kbd "RET" should also be mapped.

Mapping RET sounds okay.

For tab I'm considering a defcustom. The problem is that it conflicts with C-i, which is an unrelated Evil shortcut.

Set evil-want-C-i-jump to nil for tab

Although this is a common issue, I believe the clean solution is in unbinding TAB in evil.