VSCodeVim / VSCodeVim/Vim

Disable cursor positioning with mouse in normal mode

Open
#4,405 21 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/selection 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.
Whenever I want to focus my editor I use the mouse and randomly click inside it. Doing this repositions the cursor. I'd rather it just reactivate the editor and keep the cursor at the line it was at before and then use vim commands to navigate the file. Basically the same behaviour when using the mouse with vim in terminal.

Describe the solution you'd like
Mouse clicks inside the editor (whilst in normal) mode does not change the cursor location.

Describe alternatives you've considered
Using the keyboard shortcut to focus the editor. Not really a fan of the shortcut and I frequently use the mouse when navigating the file explorer within vscode.

Additional context
Selecting text should still work. If you're having trouble understanding the behaviour i'm describing open your terminal and run vim on a text file and use the mouse inside.

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

The issue does not name a file or test; first reproduce the behavior in VS Code Vim while in normal mode and trace the extension's mouse-handling entry point. Done means clicking focuses the editor without moving the cursor, while text selection continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.