VSCodeVim / VSCodeVim/Vim

Cursor movement (not jump) opens newly folded range

Open
#8,939 4 comments 4 reactions 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

Describe the bug
Cursor movement across folded ranges unfolds the lines, instead of move over the folded range like a single line (which is what this was intended to be in vim).

To Reproduce
Steps to reproduce the behavior:

  1. zf, e.g. zf3j
  2. j (to go to next line)

Expected behavior

In VIM, cursor will be moved to the next line after the newly created fold in step 1

In VSCodeVim, moving cursor (j/k) will unfold and move the cursor into the unfolded, "physical" line.

Screenshots
If applicable, add screenshots to help explain your problem.
If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.27.2
  • VSCode version: vscode.dev, 1.87.2
  • OS: macOS, Chrome

Additional context
Add any other context about the problem here.

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 issue with zf3j followed by j or k in VSCodeVim, comparing the movement with Vim's behavior. Trace the cursor-movement and fold-handling entry points; no files or tests are named in the report. Done means movement crosses the newly created folded range without unfolding it, with coverage for the reported sequence.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, 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.