VSCodeVim / VSCodeVim/Vim

Write some helper methods rather than directly adding transformations to the list

Open
#833 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

This is hard to read and confusing:

    vimState.recordedState.transformations.push({
      type    : "insertText",
      text    : textToAdd,
      position: position,
      diff    : new PositionDiff(0, -1),
    });

This is easy to read and not confusing:

    vimState = TextEditor.insert(vimState, textToAdd, position, new PositionDiff(0, -1));

I don't know why it took me so long to come up with this idea! It's much better than my current solution.

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

The issue names no files, tests, or entry points; start by locating direct transformations matching the shown vimState.recordedState.transformations.push pattern. Refactor those operations behind readable helper methods such as TextEditor.insert, then verify that the affected behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Refactor
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.