VSCodeVim / VSCodeVim/Vim

`<D-d>` fails for single character words in normal mode

Open
#3,395 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

First, thanks to all contributors for making this plugin what it is! This makes my VSCode experience much more pleasant. OK here's the bug report:

Describe the bug
CMD-D works well to select multiple words for multi-character words in both normal and insert modes, and it works in insert mode for single characters, but in normal mode, when the cursor is over a single character word and I push CMD-D, I can't get multiple cursors to display.

To Reproduce
Steps to reproduce the behavior:

  1. Type a a a somewhere
  2. Enter normal mode
  3. Place cursor over an a
  4. Type <CMD-D>
  5. Observe lack of multiple cursors

Expected behavior
Multiple selections appear over all matching single character words

Screenshots
cmd_d

Environment (please complete the following information):

  • Extension (VsCodeVim) version:
  • VSCode version: 1.0.2
  • OS: OSX 10.12.6

===UPDATE===

Even doing the replace on a single selected character is flawed because it searches for any instance of that character, rather than isolated instances of that character. Example in action:

vscode_replace

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 CMD-D steps with a a a in normal mode, then trace the normal-mode handling for single-character words and the related replace behavior. Done means CMD-D creates selections for all isolated matching characters without selecting unrelated occurrences.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
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.