WIP: Fixes gj and gk cursor issues. #1561
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1323 is a big issue for me. It makes it extraordinarily painful to use 'gj' full time instead of j, and makes #1552 less ideal for everybody.
VSCode continues to refuse to provide good support for getting their "hidden" desiredColumn, so I handle it myself in a special case for "gj" and "gk". Make no mistake, this is definitely not the best way to handle this. However, the perfect is the enemy of the good, and this solution will allow us to make 'gj' and 'gk' usable.
I think it's a good design principle to optimize for the common use case, and a common use case for gj and gk is rebinding j and k to them and scrolling through files. This fixes it.
One idea I should try: Using a solution similar to my fold fix.
Integrating this PR also allows a workable solution (ehhh) #1552 to folds, which is the one of the biggest pain points towards adoption for VSCodeVim (in my opinion).
It's not perfect, but I believe it's good enough. (Worse is Better anyone?)