When moving up and down in vim mode, line folding is not respected

Normally, if I use up/down arrows, the movement respects the folded lines. In other words, from inside a long paragraph, up/down arrows will bring me one line above/below as expected.

However, in vim mode, moving up or down (be it via j/k or with the arrows) moves according to the actual lines, rather than how the lines appear to be folded. I suppose this might be by design, but I personally find it quite annoying. Ideally, vim mode and regular mode would treat vertical movement in the same way.

There was a very similar discussion regading the same issue in the vim extension for vscode which might be of interest, see Treat folds the same as normal lines for cursor movement · Issue #25097 · microsoft/vscode · GitHub.

3 Likes

i am trying vim and kinda liking it, but the biggest issue for me so far is not respecting line wrapping, in windows default setting hitting end/home key once will bring you to the end/beginning of the line warp and hitting it twice will bring you to the ending of the actual line, i think that is more convenient solution

I just got into obsidian and was loving vim mode, but this behavious is really annoying.
It would be a really great fix for the dev community.

Well, if someone gets in here, the community plug-in “Vimrc Support” is a good workaround.

In the plug-in description there is a sample code that that solves this problem by remapping keys (like J to GJ) which has the desired effect.

Still, visual mode won’t work flawless, because it still sees the line as the whole block, so a core fix would still be welcome.