VSCodeVim / VSCodeVim/Vim

Replace in-house `Range` class with richer `Cursor` class

Open
#4,585 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Probably, this should subclass vscode.Selection. The first step is to remove uses of (our) Range to represent simple ranges within a document - these should use vscode.Range.

The most pressing reason for this is to have a desiredColumn per cursor. Put the following into a new document, with | representing a cursor on lines 1 and 3:

|shortword
looooooonnnnnggggggword
|looooooonnnnnggggggword
looooooonnnnnggggggword

Press e then j; observe that the bottom cursor is in line with the top one

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 locating uses of the in-house Range class and the cursor movement handling for e followed by j. Compare those uses with vscode.Range and vscode.Selection; the work is done when simple document ranges use the VS Code type and the example preserves the bottom cursor's desired column.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.