VSCodeVim / VSCodeVim/Vim

Enter insert mode when a zero length selection is set

Open
#8,801 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

Is your feature request related to a problem? Please describe.
When I am using cursorless and vim mode together, many cursorless commands set the vim selection length to zero length. This happens here. When using vim mode, that can leave you in normal mode with a zero length selection which is visually indistinguishable from insert mode.

Describe the solution you'd like
I would prefer if vim would switch to insert mode when a zero length selection is set.

Describe alternatives you've considered
Another option that would be reasonable to me would be to force a length one selection in this case.

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 with the selection handling referenced in packages/cursorless-vscode/src/ide/vscode/VscodeTextEditorImpl.ts, then trace how VSCodeVim responds when a zero-length selection is set. The change is done when setting such a selection leaves Vim in insert mode, or when the selected alternative is implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vim, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.