Comment naviguer le plus efficacement possible au début ou à la fin du texte principal d'un titre d'organisation?

9

Il est facile de naviguer rapidement du début d'un titre en mode organisation à un autre à l'aide des touches de raccourci .

Supposons maintenant que je suis au début d'un titre et que je souhaite ajouter au texte principal, au début immédiatement après le mot clé TODO. Ensuite M-f Space, j'aurai où je veux aller. S'il n'y a pas de mot clé TODO, alors c'est le cas M-f M-b.

Si je veux aller à la fin du texte du titre, c'est plus compliqué. S'il n'y a pas de mots clés à la fin et aucun texte plié caché sous le titre, c'est aussi simple que cela C-e. Mais c'est rarement le cas. S'il y a du texte plié, mais pas de mots-clés, alors je peux le faire C-e M-b. Mais s'il est un mot - clé ou deux à la fin d'un titre plié, je me trouve en tapant (l'horreur) C-e M-b M-b M-b M-f! Et s'il y a plus de deux mots clés, cela empire.

Quand je saute et édite beaucoup de titres l'un après l'autre, cela peut être beaucoup de réflexion et ça gâche vraiment tout mon flux. Idéalement, je voudrais redéfinir set en etant que touches de vitesse pour m'obtenir exactement, je veux y aller, dans tous ces cas.

Quelqu'un a-t-il vu une solution existante à ce problème? Mes compétences élisp sont minimes et il serait intimidant de résoudre ce problème par moi-même.

Brian Z
la source
2
Si le titre est une seule phrase (je pense que dans la plupart des cas, ce serait vrai), vous pouvez M-e(c'est-à-dire passer à la fin de la phrase).
wvxvw

Réponses:

9

Solution

Vous devez définir la org-special-ctrl-a/evariable sur t.


Documentation

Non-nil means `C-a' and `C-e' behave specially in headlines and items.

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.

`C-e' will jump to the end of the headline, ignoring the presence
of tags in the headline.  A second `C-e' will then jump to the
true end of the line, after any tags.  This also means that, when
this variable is non-nil, `C-e' also will never jump beyond the
end of the heading of a folded section, i.e. not after the
ellipses.

When set to the symbol `reversed', the first `C-a' or `C-e' works
normally, going to the true line boundary first.  Only a directly
following, identical keypress will bring the cursor to the
special positions.

This may also be a cons cell where the behavior for `C-a' and
`C-e' is set separately.

Exemple

Ci-dessous est évalué,

(setq org-special-ctrl-a/e t)

(1) État initial (▮ représente le point)

* TODO ab▮c                                                        :test:

(2) Après le premier C-a

* TODO ▮abc                                                        :test:

(3) Après la seconde C-a

▮* TODO abc                                                        :test:

(4) Après le premier C-e

* TODO abc▮                                                        :test:

(5) Après la seconde C-e

* TODO abc                                                        :test:▮

Connexe: Développer la sous-arborescence en mode organisationnel avec un point après les points de suspension?

Kaushal Modi
la source