Skip to content
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

Selecting with mouse or double clicking on a word to select it should NOT go into visual mode #1871

Closed
gotofritz opened this issue Jun 25, 2017 · 24 comments

Comments

@gotofritz
Copy link

Unlike what #290 says, selecting with mouse should NOT go into visual mode.

We are still using VS Code, not Vim - if I use the mouse it means I DON'T want to use Vim commands. If I wanted to only use Vim commands, then I would use Vim.

At least make it configurable so we can toggle the behaviour on / off in the preferences!

Thanks.

@Chillee
Copy link
Member

Chillee commented Jun 25, 2017

Sounds reasonable, but out of curiosity, what are the downsides of going into visual mode?

@gotofritz
Copy link
Author

Because some of us, those whose vim foo is not yet so strong, prefer to dip in and out of vim.

Note that you can still use the cursor in insert mode, and if you are in insert mode and use LEFT + SHIFT + ALT you select the whole word - remaining in insert mode. Then if you type letters you will replace the selection with what you typed. Basically VS Code behaves as if VSCodeVim was not installed when you use the cursor keys. Vim purists will probably consider it a bug, but for us beginner it's a god send. I suggest the mouse could be treated the same way. If I use the mouse it means I am not doing Vim stuff, basically. If I want visual mode I use the keyboard.

The problem is that (1) it wasn't expected, but even now that I know (2) it have to frantically click escape - i escape - i escape i until it gets back to insert mode.

Maybe it's just because I was used to Vintageous in Sublime. VSCodeVim is generally much better, but I think vintageous gets the balance of Vim + non-Vim right. Sometimes it's good to take a step back and just let VS Code be VS Code IMHO (CMD-D is another area where VSCodeVim gets in the way). A config settings to allow the mouse to be ignored would be great.

Thanks for all the great work, either way.

@galenjiang
Copy link

I think it is reasonable, this make me can not multi select something to use normal operation.

@galenjiang
Copy link

Many wired operation cause by it, selected by mouse, and can not delete normally by backspace and so on.

@knownasilya
Copy link

Same here, this has changed in the recent release I think. Basically, if you hit 'i' you are in insert mode, now if you go to select text and try to do some non-vim stuff it used to just work. Now it no longer works at all. I have to disable vim mode to use the mouse. This is a pretty big bug.

@Chillee
Copy link
Member

Chillee commented Jun 27, 2017

Alright I hear you guys. I'll make it an option in the settings.

@alexslade
Copy link

@Chillee Thanks, an option is ideal

@coryshaw1
Copy link

coryshaw1 commented Jun 30, 2017

I sometimes use my mouse to select while in Insert Mode, and when I'm in Insert Mode and select a text block, it switches me back to Visual Mode. An option to disable this forced Visual Mode would be ideal, especially while in Insert Mode.

@knownasilya
Copy link

Agree totally @coryshaw1

Chillee added a commit to Chillee/Vim that referenced this issue Jul 4, 2017
@Chillee Chillee closed this as completed in 253905a Jul 4, 2017
@knownasilya
Copy link

Woot

@jfoo1984
Copy link

is this setting released already?

@sethstha
Copy link

@jfoo1984
Not yet, Will be released on next update. Not sure when they are going to push an update. But this is what I have been waiting for so long.

@gotofritz
Copy link
Author

gotofritz commented Jul 20, 2017

Any news on the when the next update is going to be? Or is there a way to start using it before it's released? The plugin is unusable AFAIC since this change was introduced.

An extra problem is that getting out of visual mode is buggy, sometimes you have to click i or SHIFT-I several times before something happens and it's driving me mad!!

Thanks!

@Chillee
Copy link
Member

Chillee commented Jul 21, 2017

@gotofritz i isn't supposed to work in either visual mode or Visual Line mode. I currently works in visual mode but not visual line mode, so I guess that's a valid bug.

If you really want to try it now, I guess you can download the source repository and create a .vsix to load in.

The next update will probably be this weekend (hopefully). We currently have an issue with our Travis build system which would prevent a release.

@gotofritz
Copy link
Author

If anyone else found this plugin unusable since the mouse change, a different plugin, vimStyle, does the same job but without interfering with the mouse. AND without interfering with CMD-D.

@Chillee
Copy link
Member

Chillee commented Aug 4, 2017

@gotofritz if we're on the topic of other extensions I'd suggest amvim over vimstyle.

@wo52616111
Copy link

@Chillee thanks, amVim is pretty good for me, without interfering with the mouse and <cmd-D>, although it's not as powerful as VSCodeVim, I'll use it until the problem about interfering with <cmd-d> in VSCodeVim was fixed.

In addition, if someone want to try the setting vim.mouseSelectionGoesIntoVisualMode now (before the setting released), see Packaging VSCode Extensions.

@knownasilya
Copy link

Ping

@Chillee
Copy link
Member

Chillee commented Aug 30, 2017

Sorry for taking so long on pushing a release.

But VsCodeVim v0.10.0 is out now, and it has the fix.
Set "vim.mouseSelectionGoesIntoVisualMode": false to fix this issue!

@coryshaw1
Copy link

Great to hear! From what I can tell, the new setting is working as expected. Thanks for the update!

@gotofritz
Copy link
Author

Brilliant stuff - thanks for all your hard work!

@christiangenco
Copy link

Setting "vim.mouseSelectionGoesIntoVisualMode": false totally works, but it's strangely only working for me while my settings are open.

Here's a screen recording showing the bug.

When the user settings window isn't open, when I click on a line VSCode looks like it's in normal mode (the cursor appears as block and --NORMAL-- status in the bottom bar are set), but if I type a character the character gets inserted as in --INSERT-- mode (and the status immediately changes).

Opening the user settings window makes it behave correctly.

What on earth is going on? 😭

@kjgoodrick
Copy link

@christiangenco I am also experiencing the same behavior. I opened it as a new issue here.

@johnking
Copy link

johnking commented Nov 8, 2018

This option
is very helpful for me. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests