In Org mode: How can I move point (up) to the current heading (or the first line under the heading)?
2 Answers
There is binding C-c C-p
which might please you.
From the docstring: 'C-c C-p
runs the command org-previous-visible-heading'. Also note C-c C-n
for the move to the next heading.
org-mode
is built on top of outline-mode
, so you can use all the outline navigation commands. The one most relevant to your question will be outline-previous-visible-heading
. You should probably find a comfortable keybinding if you plan to use it a lot.
Note that there is also a non-interactive org-back-to-heading
that you could wrap in a command, if you like. Docstring says:
(org-back-to-heading &optional INVISIBLE-OK)
Call
outline-back-to-heading
, but provide a better error message.