VSCodeVim / VSCodeVim/Vim

Macro can't executes a inserted `<del>` that deletes the newline character

Open
#8,513 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
In insert mode, I usually press <del> to delete the newline character (so the last line above will concat the current line). Although this could be recorded by neovim, the vim extension could not record it correctly even if I enabled the neovim setting.

To Reproduce
Steps to reproduce the behavior:

  1. move the cursor to any lines except the first line.
  2. press 'q2' to record to q.
  3. record these: 0i<del><esc>
    • press 0 to move to the head.
    • press i to switch to insert mode.
    • press <del> to delete the newline character.
    • press <esc> to switch to normal mode.
  4. press '@2' to execute the recorded macro.

Sample

line1
line2
line3

Expected behavior
The insert mode actions should be executed correctly.

Environment (please complete the following information):

  • Extension version: 1.25.2
  • VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:20:58.115Z)
  • OS version: Darwin arm64 22.5.0

Additional context
I tested this on a VSCode profile that installs vim extension only and has no custom settings.

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 in the VS Code Vim extension with the recorded 0i<del><esc> macro and compare direct execution with replay via @2. Trace the macro recording and execution paths for insert-mode <del> handling; done means the macro joins the lines by deleting the newline when replayed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.