Does Visual Studio Code have box select/multi-line edit?

Visual Studio-Code

Visual Studio-Code Problem Overview


I heard Microsoft released a new editor called Visual Studio Code and it looks pretty good. One key feature that I need is multi-line edit and I can't seem to find anything about it having it.

Visual Studio-Code Solutions


Solution 1 - Visual Studio-Code

Box Selecting

Windows & Linux: Shift + Alt + 'Mouse Left Button'

macOS: Shift + option + 'Click'

Esc to exit selection.

MacOS: Shift + Alt/Option + Command + 'arrow key'

Solution 2 - Visual Studio-Code

Press Ctrl+Alt+Down or Ctrl+Alt+Up to insert cursors below or above.

Solution 3 - Visual Studio-Code

The shortcuts I use in Visual Studio for multiline (aka box) select are Shift + Alt + up/down/left/right

To create this in Visual Studio Code you can add these keybindings to the keybindings.json file (menu FilePreferencesKeyboard shortcuts).

{ "key": "shift+alt+down", "command": "editor.action.insertCursorBelow",
                                 "when": "editorTextFocus" },
{ "key": "shift+alt+up", "command": "editor.action.insertCursorAbove",
                                 "when": "editorTextFocus" },
{ "key": "shift+alt+right", "command": "cursorRightSelect",
                                     "when": "editorTextFocus" },
{ "key": "shift+alt+left", "command": "cursorLeftSelect",
                                     "when": "editorTextFocus" }

Solution 4 - Visual Studio-Code

For multiple select in Visual Studio Code, hold down the Alt key and starting clicking wherever you want to edit.

Visual Studio Code supports multiple line edit.

Solution 5 - Visual Studio-Code

On Windows it's holding down Alt while box selecting. Once you have your selection then attempt your edit.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questiont tranView Question on Stackoverflow
Solution 1 - Visual Studio-Codeuser5564157View Answer on Stackoverflow
Solution 2 - Visual Studio-CodeJoe DaleyView Answer on Stackoverflow
Solution 3 - Visual Studio-CodeJimmy HannonView Answer on Stackoverflow
Solution 4 - Visual Studio-CodeJalasemView Answer on Stackoverflow
Solution 5 - Visual Studio-CodecodemonkeyliketabView Answer on Stackoverflow