There are a few issues still, obviously š
One has to do with the first heading in a file, when the file has no frontmatter, and no content before the heading. I think I have a fix/workaround for this.
The other one, sub-headings getting unfolded, is a little misleading, I think. It may depend on how you unfold it, and the content of the folded area.
Headings unfold automatically when the cursor moves into the folded content. If you fold a heading, and then press the left arrow key to move into the folded area (from the right side), youāre actually moving into last character of the folded content (which in that case is inside ### Heading...
which is inside ## Bug?
, so they all get unfolded at once).
If you double click the #
heading prefix, or use a shortcut key to unfold the first heading only, or click the fold placeholder, I think you wonāt see the recursive unfold youāre seeing now.
Thereās some misleading behavior for unfolding as well, that I want to fix. If your cursor is after the fold marker, the unfold key wonāt affect that line, but will if you use the command from before the fold marker.
Iām not super happy with that behavior overall, and want to change it in the future.
Thereās another bug (that this exposed) where you may see two headings on a single line when using fold all. I think I have a fix for that one as well.
donāt you think that the shortcut to fold the current selection, should unfold the selection too
Thereās a separate shortcut for that! ā¦ but not in the default bindings.
With emacs bindings, itās C-x C-e
, with vim it will be za
. I need to add one for the default bindings as well, but havenāt decided on the key to use for it, that wonāt interfere with default bindings, or come as a big surprise. By default, I donāt believe sublime (which the default bindings are based on) supports a fold-toggling key.
Thanks again!