Reputation: 8481
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.
Upvotes: 30
Views: 17826
Reputation: 11
Toggle multi-cursor Modifier solves the problem, but if you copy the code and paste somewhere(i.e. onenote) highlights are removed.
Upvotes: 0
Reputation: 3097
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"
Type "Toggle multi" and click on the result "Toggle Multi-Cursor Modifier":
My VS Code version is 1.93.1
Upvotes: 1
Reputation: 954
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:
My VSCode version is 1.24.1
Upvotes: 79