Use case or problem
I want to take advantage of folding more often to help navigate my notes and focus on certain parts. I exclusively use Vim emulation and Live Preview in Obsidian, and while this works well for the most part with just a couple quirks (see Go To Link Command Inconsistencies with Cursor Position, Live Preview, and Vim Mode), one quirk prevents folds from being very useful to me.
Most commonly when I am navigating my note, I use {
and }
. These keys jump from one blank line to the next or previous, jumping over entire blocks at a time. My hope is that I could use this to jump over the heading of a folded section. However, the Vim navigation has no âawarenessâ of the fold, and will jump to the next blank line inside the folded section, automatically expanding the entire thing.
Proposed solution
Moving the cursor with Vim should not automatically expand the section. If I want to expand, I will explicitly click the fold arrow, or use the unfold hotkey.
Additionally, Vim bindings should have some âawarenessâ of the sections that are folded, treating them like a single line. Moving the cursor up and down should go onto the heading line and past it without unfolding. Using the {
and }
should jump over the heading line with no regard for the content that is inside the folded section.
Another handy use case is when I put my cursor on the folded heading, and I want to add one below. So I press o
to open a line below, but this unfolds the section and inserts the line directly below the heading.
Current workaround (optional)
Current workaround is to avoid using folds entirely, to use the mouse to click on the âother sideâ of a fold (which is antithetical to using Vim bindings in the first place), or to use some Vim motion that is guaranteed to not enter the folded section (eg. going directly to a line number on the other side, which is not practical).
I simply donât use folds because they canât be effective to me with this behavior.