VSCodeVim / VSCodeVim/Vim

inner word selection in visual block mode `^viw` doesn't select inner word

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

Describe the bug
When entering visual-mode to do selections, inner-word selection fails to select the inner word, in fact, the cursor doesn't move at all.

Whilst ciw, viwc, diw, viwd, yiw, viwy etc are great for operating on inner-words, sometimes selecting multiple items in a visual block selection is more useful e.g.

  1. when it's a complex op and it is useful to be able to see/preview the selection before you do the operation
  2. selecting (sub)columns of data in a sheet

To Reproduce
Steps to reproduce the behaviour:

  1. Create a text file with "Hello mother, hello father" he said, "I just came to say I love ya'"
  2. Position the cursor at "f", ff
  3. Enter visual-block mode, ^v
  4. Attempt to select the word 'father' with inner-word, iw
  5. Note that the cursor does not move

Expected behavior
The inner-word (father) should be selected.

Additionally in the following example, behaviour would ideally match vim, and the column should be selected up to the end of the inner-word chosen, so in the following case

first line
second line
third line
fourth

with the cursor at the f of first pressing ^vjjjiwd should leave the following:

line
 line
line

Screenshots
n/a

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.25.2
  • VSCode version: 1.77.3
  • OS: OSX

Additional context
Sorry for the spam with the edits on this issue

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

Reproduce the visual-block inner-word selection in VS Code 1.77.3 with VSCodeVim 1.25.2, following the listed steps and multiline example. Trace the extension's handling of ^v and iw, then verify that 'father' is selected and the multiline selection matches the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.