6

When in org-mode, how to move point to the beginning of the current item? (in similar fashion like back-to-indentation)

Example: Imagine following org buffer content

* headline
  - [ ] Z this is an longer item | (Point) is here. And here is some more text.
  - [X] it should work with that line too!
  - and with that one also

With point at location |, in the middle of that item. .oO(or even at the beginning of that line)
How can I easily move point to right before the letter Z?

I always jump around that location before I finaly hit it (i.e C-a M-f M-b or even C-a M-f M-f M-b) this is somewhat cumbersome..

1
  • FWIW, C-a works for me in all three cases (the cursor is on Z - or i or a - and the point is just before it, between the space and the first letter of the item) - Org mode version 9.3.4 (release_9.3.4-211-gb694c2)
    – NickD
    Commented Feb 7, 2020 at 15:45

2 Answers 2

10

Consider to customize variable org-special-ctrl-a/e. Possibly that will ease your flow.

From the documentation. Note in particular the "item" part.

When t, ‘C-a’ will bring back the cursor to the beginning of the headline text, i.e. after the stars and after a possible TODO keyword. In an item, this will be the position after bullet and check-box, if any. When the cursor is already at that position, another ‘C-a’ will bring it to the beginning of the line.

You can also consider the other documented values for org-special-ctrl-a/e.

3

The existing answer is correct. I just wanted to add for posterity (and i'm not venerable enough to add comments) that for me and some other users enabling visual-line-mode remaps the relevant keys and so prevents org-special-ctrl-a/e from having any effect.

Remapping C-a and C-e with something like:

(define-key org-mode-map "\C-a" 'org-beginning-of-line)
(define-key org-mode-map "\C-e" 'org-end-of-line)

or your preferred way of doing it, should get it going though.

Found it in this reddit post

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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