VSCodeVim / VSCodeVim/Vim

Add option `{"vim.mouseSelectionMovesCursor": false}`

Open
#4,153 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
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 using cli vim with set mouse= clicking and selecting does NOT change mode or move the cursor. This allows you the be in the middle of insert typing and then mouse-select, cmd-C, cmd-V to copy-paste into your current cursor location. That is to say, the mouse cursor and the terminal/text cursor are totally separate. It makes it VERY difficult for people who have used vim for 20+ years to learn to use VSCode.

Describe the solution you'd like
Please add an option to make mouse selections (click-drag, double-click, triple-click) not move the text cursor. I'd call it {"vim.mouseSelectionMovesCursor": false}.When combined with {"vim.mouseSelectionGoesIntoVisualMode": false} this would give an experience that is consistent enough with terminal. You could add an option for {"vim.mouseClickMovesCursor": false} and then it would be totally consistent with the terminal. But, I don't need that feature myself.

Describe alternatives you've considered
I'd be willing to try my hand at contributing to this feature. But, I've never done anything with VSCode development. I'd need a lot of guidance, and I'm not so sure that addressing selections and cursors separately is going to be possible with the incumbent/inherent API/model

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 examining the existing vim.mouseSelectionGoesIntoVisualMode option and how VS Code models selections and the text cursor. Determine whether click-drag, double-click, and triple-click selections can avoid moving the cursor independently. Done means the proposed mouseSelectionMovesCursor setting works without breaking the existing visual-mode option.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.