Two pairs of navigation functions to jump around in org-mode buffers:
- Up/Down heading
- Next/Previous heading/item/paragraph
Each function tries to narrow things down without narrowing too much. See the demo the explanations.
(use-package org-evil-navigation)
Package recipe:
(package! org-evil-navigation
:recipe (:repo "mskorzhinskiy/org-evil-navigation"
:host github :branch "main"))
For doom emacs:
(map! :map org-mode-map
:n "C-h" #'org-evil-navigation-up
:n "C-l" #'org-evil-navigation-down
:n "C-j" #'org-evil-navigation-next
:n "C-k" #'org-evil-navigation-prev)
(map! :map org-mode-map
:leader
(:prefix-map ("t" . "toggle")
:desc "Navigation regime" "n" #'org-evil-navigation-collapse-set))
For vanilla emacs:
(define-key org-mode-map (kbd "M-u") #'org-evil-navigation-up)
(define-key org-mode-map (kbd "M-d") #'org-evil-navigation-down)
(define-key org-mode-map (kbd "M-n") #'org-evil-navigation-next)
(define-key org-mode-map (kbd "M-p") #'org-evil-navigation-prev)