33

according to the documentation here I can add multiple cursors in visual studio code by using alt+Click in the editor. Sadly alt+drag is already used by the window manager to move the window around, so visual-studio-code does not get any key events. So how do I change that keyboard configuration in visual studio code? I could not find anything in the default key combinations file.

I am not looking for solution that changes my window manager, I really like that behavior and use it very frequently already for a very long time.

4 Answers 4

85

The easiest way in my opinion is:
From the top-level menu, click on

Selection -> Switch to Ctrl+Click for Multi-Cursor

Then you can use Ctrl+Click rather than Alt+Click.

You can see where this is in this screenshot: You can see where is this in this screenshot

My VSCode version is 1.24.1

Sign up to request clarification or add additional context in comments.

2 Comments

I tag this as the correct answer for now. But it is not really a solution as it breaks code navigation code.visualstudio.com/docs/editor/editingevolved
Today I noticed a side-effect of this change: the link in terminal is changed to Alt+Click (which cause the original problem OP faced). So at this time either you can only choose one action for Ctrl+Click. For code navigation I can set keyboard shortcut, but for opening the link in terminal, there is no option to change.
7

There is currently no way to do this but already an open issue on GitHub which addresses that.

1 Comment

There is a way now, look at my answer below (stackoverflow.com/a/52375893/4233310)
1

Go to the Command Palette using Ctrl+Shift+P or clicking into the search bar to the top and then again on "Show and Run Commands"

enter image description here

Type "Toggle multi" and click on the result "Toggle Multi-Cursor Modifier":

enter image description here

My VS Code version is 1.93.1

Comments

0

Toggle multi-cursor Modifier solves the problem, but if you copy the code and paste somewhere(i.e. onenote) highlights are removed.

1 Comment

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.