我习惯以以下方式使用代码编辑器来编写注释:
a topic
. a note
? a question regarding the note
- a to do item
. some more details
. another note
. more details
another topic
...
我喜欢VS Code的地方在于,它允许基于txt文件的缩进折叠(折叠)块(如Python):
a topic
+ . a note
. another note
. more details
another topic
...
但是,我不喜欢的是它也将空行包含在折叠的块中:. more details
之后的行没有缩进,但是当我折叠该块时,会得到
a topic
+ . a note
+ . another note
another topic
...
我希望成为时
a topic
+ . a note
+ . another note
another topic
...
您能建议我更改哪些选项以使折叠方面有所不同吗?
除非您使用第3方扩展名,否则我不知道防止在VS Code中折叠最后一行的方法。
如果您是search extensions for 'folding',您应该会看到几个。 Explicit Folding似乎具有控制此的选项。但是还有更多。看一看,看看是否符合您的需求。如果不是这样,那么实现此目标的唯一方法就是开发一个扩展,以您想要的方式处理此问题。