VSCodeVim / VSCodeVim/Vim

Infinite scrolling in visual mode (`<C-e>`, `<C-y>`)

Open
#3,669 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
I am using these shortcuts to scroll the page by multiple lines

"vim.normalModeKeyBindingsNonRecursive": [
...
        {
            "before": ["<C-j>"],
            "after": ["8", "<C-e>"]
        },
        {
            "before": ["<C-k>"],
            "after": ["8", "<C-y>"]
        },
...
]

It works fine in normal mode, but in visual mode the scrolling goes all the way to the beginning or the end of the file.

To Reproduce
Steps to reproduce the behavior:

  1. Have this in settings.json
"vim.visualModeKeyBindingsNonRecursive": [
...
        {
            "before": ["<C-j>"],
            "after": ["8", "<C-e>"]
        },
        {
            "before": ["<C-k>"],
            "after": ["8", "<C-y>"]
        },
...
]
  1. Open a file that is at least two pages long.
  2. Have some text selected in visual mode
  3. Start scrolling up and down with ctrl+j and ctrl+k

Expected behavior
Expected to just scroll up and down by the amount specified in settings

Screenshots
Screenshot 2019-04-09 at 22 43 33

Environment:

  • Extension (VsCodeVim) version: 1.4.0
  • VSCode version: 1.33.0
  • OS: Mac OS and Windows 10

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 by reproducing the issue with the settings.json visualModeKeyBindingsNonRecursive mappings for and , using a file at least two pages long and a visual selection. Then trace the visual-mode handling of and ; done means the mappings scroll by the configured amount without jumping to the beginning or end.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.