org-mode - 是否可以只折叠一个子树而不必循环 TAB 功能?
问题描述
我的意思是,如果你有一棵树,然后你去 1.2.1,我想扩展和折叠它而不扩展孩子(1.2.1.1 和 1.2.1.2)。
换句话说,通常我必须按三下TAB,这显示了所有子子项的扩展。我只想要一个不同的按键来关闭最近打开的子树。
谢谢!希望我说清楚了!例如
解决方案
有可能,如果您开始定义 lisp 函数,那么在 emacs 中一切皆有可能。然而,这使我不知道。
我从可用功能中可以看出,您不能以直接的方式做到这一点。请参阅 TAB 键帮助中的一些相关亮点:
<tab> runs the command org-cycle.
(...)
- When point is at the beginning of a headline, rotate the subtree started
by this line through 3 different states (local cycling)
1. FOLDED: Only the main headline is shown.
2. CHILDREN: The main headline and the direct children are shown.
From this state, you can move to one of the children
and zoom in further.
3. SUBTREE: Show the entire subtree, including body text.
If there is no subtree, switch directly from CHILDREN to FOLDED.
(...)
- When there is a numeric prefix, go up to a heading with level ARG, do
a ‘show-subtree’ and return to the previous cursor position. If ARG
is negative, go up that many levels.
完整帮助请参阅“Ch k TAB”。
您还可以设置VISIBILITY
每个缓冲区的属性:
#+STARTUP: fold (or ‘overview’, this is equivalent)
#+STARTUP: nofold (or ‘showall’, this is equivalent)
#+STARTUP: content
#+STARTUP: showeverything
见:C-h v org-startup-folded
。
底线是:也许最简单的方法就是按 TAB 3 次,除非您精通 lisp 并且愿意进行更改,,,
推荐阅读
- sql-server - 如何结合使用 datepart 函数和 count 函数?
- elastic-stack - 使用两个不同的日志文件作为输入创建通用日志文件
- mysql - 无法在mysql上建立多个外键,专门在mariaDB和w3schools online mysql上测试过
- sql - 修复连接表函数或不重复值?
- c++ - 为什么 std::vector::iterator::operator-> 只向下钻取一层?
- awkward-array - 如何在笨拙的数组中复制锯齿状数组
- django - 使用 DRF APITestCase 但不是 django 的 TestCase 测试发现失败
- php - 如何在大型 php 字符串变量中设置 if/else 条件?
- angular - 角度输入类型日期:如何获取当前日期预设?
- ios - 如何从导航栏返回项中删除文本