VSCodeVim / VSCodeVim/Vim

Scrolling with `j` and pasting hangs the editor for seconds

Open
#8,127 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

To Reproduce

  1. Create a file with 300+ lines
  2. Copy some text (for example using yy) and move the cursor to line 1
  3. Hold j until you're on the last line
  4. Press p

Expected behavior
The copied text is pasted on the next frame or two (like 30ms)

Actual behavior
VS Code hangs for upwards of 5 seconds

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.24.3
  • VSCode version: 1.73.1
  • OS: macOS 13.0.1

Additional context
I have these VsCodeVim settings

  "vim.useSystemClipboard": true,
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["Y"],
      "after": ["y", "$"]
    }
  ],

Here's a profile of the issue: pasting-after-scrolling-vscode.cpuprofile.txt

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

Reproduce the reported slowdown in VSCodeVim using the listed steps on a 300+ line file, then inspect the provided VS Code renderer CPU profile. Compare the time spent scrolling with the paste operation and verify that pasting after holding j completes within the expected next frame or two.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.