Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
corneliusroemer opened this issue Jun 22, 2021 · 1 comment

Comments

@corneliusroemer
Copy link

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.
@kopach
Copy link

kopach commented Oct 13, 2022

From Vim tutorial https://vimhelp.org/usr_25.txt.html#25.4

	zh		scroll right
	4zh		scroll four characters right
	zH		scroll half a window width right
	ze		scroll right to put the cursor at the end
	zl		scroll left
	4zl		scroll four characters left
	zL		scroll half a window width left
	zs		scroll left to put the cursor at the start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants