mouseSelectionGoesIntoVisualMode from insert mode too
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
Currently, even when vim.mouseSelectionGoesIntoVisualMode is on, selecting with a mouse when being in an insert mode doesn't change it (see here). This is different than a default behavior in vim.
To Reproduce
Enter insert mode with i, then select with mouse in any file.
Expected behavior
vim should enter visual mode.
Additional context
As I understand it, the original plan was to implement full-on Select Mode (#5716), however, 4 years after #5842 was opened, I think it's the right time to declare PR bankruptcy there and address the issues in smaller scale.
Note: this issue is particularly annoying when working in jupyter notebooks, where each cell has a separate "mode" and it's difficult to track in which cell when selecting with mouse you'll be in an insert vs virtual modes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/mode/modeHandler.ts around line 417 and reproduce the issue by entering insert mode with i before selecting text with the mouse. Trace the mode transition and verify that mouse selection enters visual mode when vim.mouseSelectionGoesIntoVisualMode is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100