Is it possible to prevent VSCode from unfolding a folded code section if I move past it with my cursor using the arrow keys?
A common workflow I have coming from Atom is to fold parts of my code, then move my cursor down below the folded sections to get to later sections of a file. If I do this in VSCode, the folded section will unfold as soon as my cursor crosses the top of the section. I want it to move past it instead.
Here's an example:
I searched my prefs and Google for a setting, but couldn't find one.
The code formatting is available in Visual Studio Code through the following shortcuts: On Windows Shift + Alt + F. On Mac Shift + Option + F. On Linux Ctrl + Shift + I.
My Google-fu failed me when I first opened this but there's plenty of discussion around it, and a fix.
The FAQ for the VSCodeVim extension also says this:
- Moving j/k over folds opens up the folds
Try setting vim.foldfix to true. This is a hack; it works fine, but there are side effects (see issue#22276).
The fix is working great for me!! Very happy to have solved this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With