VSCodeVim / VSCodeVim/Vim

Delete registers 1-9 not working properly.

Open
#7,279 2 comments 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

Delete registers should be filled automatically with content, when using yank or delete commands. The most recently yanked text will fill the “0 register, unless we specify another register in the yank command. This far Vs Code Vim works as expected. But when we want to do the same with the delete command, the "0 register will not get filled.

With each successful change or deletion, Vim should shift the previous content of register “1 into register “2, “2 into “3, and so forth, and the previous content of register “9 should be discarded. However this functionality also seems to be missing.

Steps to reproduce the behavior:

Use the following text as example.

foo
bar

Use yy to copy line 'foo', then check registers with :reg. The "0 register should contain 'foo'. Do the same with dd, but on line 'bar'. The "0 register is still containing 'foo', and not 'bar'.

The correct behavior would be "0 containing 'bar', and "1 containing 'foo'.

Environment:

  • Extension (VsCodeVim) version: v1.21.10
  • VSCode version: 1.62.3
  • OS: Linux, Ubuntu 18.04 LTS (Bionic Beaver)

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 in VS Code Vim using the documented yy, dd, and :reg sequence, then trace the register handling for yank and delete commands. Done means deleted text populates register "0, prior deleted text shifts through registers "1-"9, and the behavior matches the expected example.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.