0

I'd like to navigate in my org-mode files sometimes using just the home row, but other times I'm perfectly ok with the full emacs default key-bindings for org-mode. For instance, when everything is folded, I'd like to just use j or k for up and down since I only want to navigate up to the correct headline to tab it open. I realize I could just do a ace-jump, or search, or something, but I'm curious if there already exists something that makes this VIM like navigation possible? Also, I don't think I'm ready to go full evil-mode yet.

2 Answers 2

1

There is the worf package by abo-abo that does something like this.

1

Org itself brings such a feature, which you could expand.

You have to setup your org-mode a bit, because this keymap is auto-generated on every call to the function. Also you need to disable the auto isearch feature to navitage. see following source:

(setq org-goto-auto-isearch nil)

(advice-add 'org-goto-map :after (lambda ()
                                   (org-defkey org-goto-map "k" 'outline-next-visible-heading)
                                   (org-defkey org-goto-map "j" 'outline-previous-visible-heading)))

Use this feature by using C-c C-j or calling M-x org-goto.


There are also other, more universal ways to easily set up those keybindings, without going vi-style, those work also for other parts of Emacs:

Org-mode defines functions: org-next-visible-heading and org-previous-visible-heading, which you could bind with above mentioned packages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.