Write some helper methods rather than directly adding transformations to the list
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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