This question already has an answer here:
-
Multiline editing in VSCode
17 answers
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.
Box Selecting
Windows & Linux : shift + alt + 'Mouse Left Button'
macOS : shift + option + 'Click'
Esc to exit selection.
MacOS: shift + alt/option + command + 'arrow key'
Press Ctrl+Alt+Down or Ctrl+Alt+Up to insert cursors below or above.
The shortcuts i use in Visual studio for multiline (aka box) select are Shift+Alt+ up/down/left/right
To create this in VS Code you can add these keybindings to the keybindings.json file (File -> Preferences -> Keyboard 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" }
For multiple select in visual studio code, hold down the alt
key and starting clicking wherever you wana edit.
Visual studio code support multiple line edit
On windows its holding down alt while box selecting. Once you have your selection then attempt your edit.