Visual Studio代码有框select/多行编辑?

我听说微软发布了一个名为Visual Studio Code的新编辑器,它看起来不错,我需要的一个关键特性是多行编辑,我似乎无法find任何关于它的东西。

有趣的是,Visual Studio Code的某些部分实际上是基于ATOM的

http://thenextweb.com/apps/2015/04/30/microsofts-cross-platform-visual-studio-code-app-is-based-on-githubs-atom-editor/

如果你的意思是多个游标,Code确实支持这个(参见多个游标一节)。

框select

Windows和Linux: shift + alt +'鼠标左键'

macOS: shift + option +'点击'

Esc退出select。

MacOS: shift + alt / option + 命令 +“箭头键”

Ctrl + Alt + DownCtrl + Alt + Up可在下方或上方插入光标。

我在Visual Studio中用于多行(又名框)select的快捷键是Shift + Alt +向上/向下/向左/向右

要在VS代码中创build此项,您可以将这些键绑定添加到keybindings.json文件(文件 – >首选项 – >键盘快捷键)。

{ "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" } 

要在Visual Studio代码中进行多个select,请按住alt键,然后在需要编辑的位置开始点击。 Visual Studio代码支持多行编辑

在窗户上,按住Alt键的同时select框。 一旦你有你的select,然后尝试编辑。