8

I have looked everywhere and I am still unable to switch off this 'feature'!

I've been using vi and, later, vim, since the 80's and I have never had need of multiple cursors, nor can I see a use for them.

:<range>s/search/replace/ does everything I need so this new feature is infuriating beyond words, especially as I've no idea how to switch it off when it seemingly-randomly appears.

Would someone be wonderful enough as to tell me how to banish, remove, consign-to-history the multiple cursors feature in VSCode Vim 1.12.4, please?

alexbhandari
  • 1,310
  • 12
  • 21
pwmusic
  • 4,739
  • 4
  • 23
  • 14
  • « Seemingly randomly »? I’m no VSCode user (i prefer pure vim) but wouldnt there be a proper trigger to avoid? – D. Ben Knoble Jan 07 '20 at 05:25
  • I agree. It's something that I hit while typing, perhaps something to do with the control key, but I will *never* use multiple cursors so I want them gone. I've had to disable the entire Vim plugin for VSCode as I can't get rid of the multiple cursors and it's destroying my code. – pwmusic Jan 07 '20 at 09:20
  • I can't establish whether it's something in VSCode, or something in the Vim plugin. – pwmusic Jan 07 '20 at 09:22
  • It *shouldnt* be something in the vim plugin, but it could be something in whatever vscode uses for vim configuration. [Here’s what I found](https://code.visualstudio.com/docs/editor/codebasics#_multiple-selections-multicursor). [also this](https://github.com/Microsoft/vscode/issues/66634) – D. Ben Knoble Jan 07 '20 at 14:13
  • 1
    Here's what the problem was: some 'genius' decided it would be a good idea to introduce functionality that *automatically* started multiple cursors when typing or moving through HTML tags! No amount of key presses *however hard that key was pressed* would stop it. Instead, I needed to untick the new html.mirrorCursorOnMatchingTag setting. Can you imagine a car manufacturer arbitrarily and without warning deciding that turning left would automatically increase speed, or turning right would automatically apply the brakes? For obvious reasons, they wouldn't. *smh* – pwmusic Jan 26 '20 at 20:28
  • 1
    Thanks to @D.BenKnoble for taking the time to read and comment on this infuriating issue. – pwmusic Jan 26 '20 at 20:30
  • 1
    Thanks @Patrick You should make an answer so it can be accepted. You're a life saver! I thought I was going crazy! – kjbetz Jan 29 '20 at 02:32

1 Answers1

4

I believe this issue is specific to the plugin. I experienced it with the HTML plugin recently, and I'm assuming you have the same problem with HTML files, but the same principle should apply to other plugins as well. You just have to find the setting.

In the VS Code settings, there is an option that reads:

HTML: Mirror Cursor On Matching Tag

You can uncheck the box there to disable the feature. Or you can go to the settings.json in your local repo (inside the .vscode directory), or the equivalent global file, and add/modify the following field like so:

"html.mirrorCursorOnMatchingTag": false

That should take care of it for you.

Austin Davis
  • 102
  • 8