Does Visual Studio Code have box select/multi-line

2019-01-21 07:01发布

This question already has an answer here:

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.

5条回答
放荡不羁爱自由
2楼-- · 2019-01-21 07:49

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

查看更多
时光不老,我们不散
3楼-- · 2019-01-21 07:53

Box Selecting

Windows & Linux : shift + alt + 'Mouse Left Button'

macOS : shift + option + 'Click'

Esc to exit selection.

MacOS: shift + alt/option + command + 'arrow key'

查看更多
老娘就宠你
4楼-- · 2019-01-21 07:55

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" }
查看更多
Animai°情兽
5楼-- · 2019-01-21 07:57

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

查看更多
We Are One
6楼-- · 2019-01-21 07:57

On windows its holding down alt while box selecting. Once you have your selection then attempt your edit.

查看更多
登录 后发表回答