如何最有效地导航到组织标题的主要文本的开头或结尾?


9

使用快速键从一个组织模式标题的开头快速导航到另一个很容易。

假设现在我是标题的开头,并且我想添加到正文中,紧接在TODO关键字之后的开头。然后M-f Space会带我到我想去的地方。如果没有TODO关键字,则为M-f M-b

如果我想到达标题文本的末尾,则比较棘手。如果结尾没有关键字,并且标题下方没有隐藏的折叠文本,则与一样简单C-e。但是,这种情况很少。如果有折叠文本,但没有关键字,那么我可以做C-e M-b。但如果一个或两个关键词在标题折叠的结束,那么我会发现自己打字(恐怖)C-e M-b M-b M-b M-f!而且,如果有两个以上的关键字,情况会更糟。

当我一个接一个地跳来跳去并编辑大量标题时,可能要考虑很多事情,这确实弄乱了我的整个流程。理想情况下,在所有这些情况下,我都想重新定义se作为快速键来使我准确地想要离开。

有没有人看到这个问题的现有解决方案?我的elisp技能很少,要靠我自己解决这个问题很艰巨。


2
如果标题是一个句子(我认为在大多数情况下是正确的),则可以M-e(即移至句子的结尾)。
wvxvw 2015年

Answers:


9

您需要将org-special-ctrl-a/e变量设置为t


文献资料

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.

下面进行评估,

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

(1)初始状态(▮代表点)

* TODO ab▮c                                                        :test:

(2)首先 C-a

* TODO ▮abc                                                        :test:

(3)秒后 C-a

▮* TODO abc                                                        :test:

(4)首先 C-e

* TODO abc▮                                                        :test:

(5)秒后 C-e

* TODO abc                                                        :test:▮

相关:用省略号后的点扩展组织模式子树?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.