VSCodeVim / VSCodeVim/Vim

Incorrect behavior of nnoremap z zz mapping

Open
#8,454 0 comments 0 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
The nnoremap z zz mapping in the Visual Studio Code Vim extension is not working as expected. When using this mapping, the current line is centered, but the cursor also moves forward by one character, which is not the desired behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Install the Visual Studio Code Vim extension.
  2. Open Visual Studio Code.
  3. Set up the mapping nnoremap z zz in .vimrc file.
  4. Open a file.
  5. Move the cursor to any line in the file.
  6. Press the 'z' key.

Expected behavior
After pressing the 'z' key, the current line should be centered without any changes to the cursor position.

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 nnoremap z zz mapping in the Visual Studio Code Vim extension using the listed steps, then trace how the mapping handles the z key and cursor position. Done means centering the current line without moving the cursor forward.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.