skip to Main Content

I am trying to use Cmd + Click to drag multiple cursors into existence.

However, when I select "Switch to Cmd+Click for multiple-cursor" it doesnt work, instead Alt + Click works to create multiple cursors which is odd…. then when I switch it back to "Switch to Alt+Click for multiple-cursor" neither Cmd + Click and Alt + Click work. I believe this is because the default settings in the JSON file has editor.multiCursorModifier": "alt". I can’t edit the file because it’s in read-only mode which I don’t know how to change. I’ve been at this for over 4 hours now so I would appreciate anyone’s help on this.

2

Answers


  1. I was looking around, and I found out that the defaultSettings.json file isn’t supposed to be edited by you. This is because these are the "factory" settings for vscode, so if you ever mess anything up, you can always refer back to this.

    Instead what you need to do open your user settings json file. You can do this in vscode by clicking on the search bar, then pasting in >Preferences: Open User Settings. Then add the line "editor.multiCursorModifier": "ctrlCmd",.

    If this doesn’t work, then try deleting the contents in the settings.json and copy-pasting the contents from defaultSettings.json into settings.json (note that this will factor-reset your settings). Then replace the "editor.multiCursorModifier": "alt", with "editor.multiCursorModifier": "ctrlCmd",

    Login or Signup to reply.
    1. Ctr + Shift + P
    2. Type "settings"
    3. Click on Preferences: Open user settings (JSON)
    4. Search for editor.multiCursorModifier (if it does not exist –> default: alt) and modify as you expect. For more https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search