VSCodeVim / VSCodeVim/Vim

VisualLine expands selection to then next line upon repepetive `V` strokes

Open
#7,848 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

Hello, i would like to hit vv to get visual line and then each next v expands selection to then next line. Do you think it is possible to set such thing up in settings/keybinds?

My idea was to utilize when option as following

 {
            "before": [
                "v"
            ],
            "after": [
                "V"
            ],
            "when": "vim.mode != 'VisualLine'"
        },
        {
            "before": [
                "v"
            ],
            "after": [
                "j"
            ],
            "when": "vim.mode == 'VisualLine'"
        }

But first of all those whens are not respected - i think Visual == VisualLine and second of all one map overrides other.

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 vv and repeated v behavior in VisualLine mode, then inspect the settings/keybinds handling for the when expressions using vim.mode. Confirm how Visual and VisualLine are distinguished and why the two mappings override each other; done means repeated v expands the selection to the next line without breaking existing mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.