VSCodeVim / VSCodeVim/Vim

Horizontal scrolling does not work as expected, limitation not clear in documentation

Open
#6,782 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/documentation upstream/vscode
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Resurface of 2y old bug report that got closed as upstream, slightly reworded/improved

Describe the bug
Even though warp is disabled (toggled by Alt-z), zh/zl/zH/zL are not working properly.

Expected behavior
zh: scrolls one character, cursor does not move in document etc.

Actual behavior
zh: move cursor to the right character, the same as l
zl: move cursor to the left character, the same as h
zH: move cursor +60 char if >60char left, otherwise beginning of next line
zL: moves cursor +60 char if >60char left, otherwise end of previous line

In https://github.com/VSCodeVim/Vim/blob/master/ROADMAP.md#scrolling it's stated that zH etc work with customisation, but in fact, it's not clear that it's a very dirty workaround.

Possible solutions

  1. Make it clear in the roadmap/docs, that scrolling is not properly implemented. Everyone can move cursors, that's not the same as scrolling.
  2. Stop cursor from switching lines, this is very much not what one would expect at all, it makes no sense.
  3. Find a better workaround: maybe moving 120 char right, then 120 char left as opposed to just 60 right? That way one scrolls without having the cursor change place.
  4. Convince upstream to make proper scrolling available through the API and implement the feature as in original vim.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ROADMAP.md#scrolling and the linked historical issue, then reproduce zh/zl/zH/zL with warp disabled in the current extension. Clarify whether the accepted scope is documentation or behavior, and consider the work done only when the limitation or corrected scrolling behavior is verified and documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.