Skip to content

mouseSelectionGoesIntoVisualMode from insert mode too #9214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sygi opened this issue Aug 21, 2024 · 5 comments · May be fixed by #9594
Open

mouseSelectionGoesIntoVisualMode from insert mode too #9214

sygi opened this issue Aug 21, 2024 · 5 comments · May be fixed by #9594

Comments

@sygi
Copy link

sygi commented Aug 21, 2024

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.

@sygi
Copy link
Author

sygi commented Aug 21, 2024

It seems that the decision to diverge from the vim behavior was made here. Is there any context available? Can we maybe have a setting which controls this?

cc @nguymin4

@nguymin4
Copy link
Contributor

@sygi It was so long ago so I cannot say for sure. Nowadays I only use neovim or vim, and the behaviour is if I'm in Insert mode and select some text with my mouse, it actually triggers the terminal selection mode instead of going to neovim/vim visual mode

It could be my setting that disables mouse somewhere as well, but then it also means that behavior similar to mouseSelectionGoesIntoVisualMode: false

Side note: I have terrible perfomance issue with VSCodeVim when using Jupyter notebook so I usually disable it ...

@sygi
Copy link
Author

sygi commented Aug 21, 2024

Hmm, the behavior you describe happens when you disable mouse handling by vim; you'll always be able to achieve that via ~/.vimrc.

I kinda like the vim mode in jupyter notebook, except for this issue ^^
I prepared a quick fix above.

@nguymin4
Copy link
Contributor

I just want to say that, please double check with other maintainers about the intention and plan with that setting. Even if it may not affect me anymore, people may notice the changed behavior and ask about it (think about non-jupyter users). And we end up in a complaining loop.

Anyways, I do wish the vim support for notebook become better.

@sygi
Copy link
Author

sygi commented Aug 21, 2024

Of course, that's the point of this thread / issue :)

jcherniak added a commit to jcherniak/Vim that referenced this issue Apr 26, 2025
…-> visual transition without changing current behavior. Fixes VSCodeVim#9214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants