Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Foldfix ignores relative line numbers

Open tareq-qqq opened this issue 2 years ago • 2 comments

When having "vim.foldfix": true and relative lines enabled, j and k act like gj and jk.

If you type 39j here instead of going to line number 39 you move down 39 visual lines just like when using 39gj

Screenshot 2023-12-11 200810

What can I do to prevent this behavior while still having foldfix.

tareq-qqq avatar Dec 11 '23 17:12 tareq-qqq

I've noticed the same thing, would be nice to have a fix for this.

ryanpagel avatar Sep 26 '24 05:09 ryanpagel

I'm experiencing the same issue.

With foldfix enabled: scrolling through folded lines won't open the folds✅, but jumping to relative lines won't work❌. With foldfix disabled: jumping to relative lines works✅, but scrolling through folded lines will unfold them❌.

I tried remapping {1-10}j/k to exactly {1-10}j/k (to avoid {1-10}gj/gk) but no luck.

This particular issue could be solved if VSCode reverts back the change they made to relative lines (so that the relative line numbers don't account for the folded lines), but from what I understand it could break other functionality like yanking etc. See this issue for more details. People have requested putting that option under a setting and until it's done, it would be great to have a solution for this.

rasulozan avatar Mar 30 '25 06:03 rasulozan