Vim
Vim copied to clipboard
When a method/comment is folded `<C-e>` stops scrolling before it.
Describe the bug I use the VSCode feature to fold methods/comments quite often, and <C-e> shortcuts to move between lines quite often. The problem arises when you fold a method and try to <C-e> through it. It just stops before it. <C-y> works properly by jumping through the folded element and allowing you to scroll.
To Reproduce Fold a comment/method/etc and try to <C-e> through it.
Expected behavior When method/comment/etc. is folded jump through it and allow me to keep moving through text.
Environment (please complete the following information):
- Extension (VsCodeVim) version: 1.38.1
- VSCode version: Version: 1.38.1
- OS:MAC OS
I haven't looked closely, but since VSCode doesn't tell us where folds are, we may not be able to solve this
This also for me, was a real bummer.
First off, this is not a problem with vim then more with the "command": "editorScroll"
It's possible to fix it with scrolling the viewport not scrolling by lines (which are kind of inaccessible when they live inside folds).
A more detailed description of the issue is found here: https://github.com/microsoft/vscode/issues/61552
For me, the solution was to use this plugin: Scroll Viewport. It's made by one of the participants of the linked thread, who also experienced this problem. Just bind it to <ctrl-e> and add the desired line numbers to scroll into your settings.
edit: the extension above had the disadvantage of not respecting scrollOff. Also it was providing just one scrolling command - as user may face problems with not just one scroll command around folds a fix for those situations was missing.
In the end I wrote an extensino that solves these issues and allows useful keyboard scrolling commands that won't get obsurced by folds: https://github.com/tobealive/german-scroll.code